Home > User Support > CoverageMaster winAMS FAQ

CoverageMaster winAMS FAQ

Stub Functions

002_01: How to enable/disable global stub functions for an individual test (test CSV file)?

Question:

When using the "Replace" checkbox to enable/disable a stub function, the replace control is applied to all tests for the function and I am unable to test the original function. How can I enable/disable stub functions for an individual test (test CSV file)?

Answer:

Instead of using the global stub function tab's "Replace" checkbox, the use of stub functions can be set individually for each test CSV file. First uncheck the "Replace" checkbox in the "Stub Settings" screen as shown below.

Next from the "Test Settings" screen, select the test CSV file and click the "Edit I/O..." button to open the "Unit Test CSV Settings window. From the "Unit Test CSV Settings window click the "Stub Settings" button to open the "CSV File Stub Settings" window. From the "CSV File Stub Settings" window select the subfunction on the left and click the "-->" button next to the "Use Stub Functions" list as shown below.

The selected subfunction will be added to the "Use Stub Functions" list as shown below.

In this way the subfunction added to the "Use Stub Functions" list will be replaced with the stub function when running the test for this test CSV file.

If instead you wish to not replace the subfunction with a stub function even when the global stub function "Replace" checkbox is checked in the "Stub Settings" screen, add the subfunction to the "Don't Use Stub Functions" list as shown below.

In this way the subfunction added to the "Don't Use Stub Functions" list will not be replaced with the stub function when running the test for this test CSV file.


Related Technical Tips Search

Other technical tips in GAIO's web site can be searched for using the links below.

Search key word link: Stub for Each CSV
Technical Tips Google Search


Information Links