Generation of Unit Test Data
After selecting all the appropriate Record Test Case dialog items, click OK to request unit test data generation from the debug session.
Continue the debug session. When the debugger completes, a message similar to the following displays in the Console view:
Test case created at exit of program program_name. Project: project_name: CWXTCOB_Scenario TestCase: CWXTCOBCase1
Considerations when Setting Limits for Stub Data Collection
Test case execution may produce failures when stubbing files where the number of records processed is greater than the number of records collected in the stubs.
Example 1:
Target program ABC called sub-program XYZ 149 times. However, the stub for sub-program XYZ was limited to collecting data for only 100 calls. To avoid erroneous unit test assertion failures and possible improper processing by the target program, either use Code Debug to re-record the test case, increasing the stub collection limits, or manually edit the stub to add the appropriate data for the additional sub-routine calls.
Example 2:
Target program ABC read 299 records from file INPUT01. However, the stub for file INPUT01 was limited to collecting data for only 200 I/O operations. To avoid erroneous unit test assertion failures and possible improper processing by the target program, either use Code Debug to re-record the test case, increasing the stub collection limits, or manually edit the stub to add the appropriate data for the additional file records.
IMS Live Program Testing
IMS Live Program testing with Total Test Test has some limitations. We highly recommend testing IMS programs using IMS Stubs created using Total Test. This approach allows running your IMS program outside of an IMS System.
There is limited testing support for IMS BMP and Batch DL/I programs in a live IMS system. Call Parameter assertions are not supported for live IMS execution. Total Test must pass the parameters from IMS system to the IMS Program. The IMS System Pointers being passed from IMS system to the IMS Program do not allow variable substitutions by Total Test. The values in these parameters may change while IMS is executing so there isn’t a way to keep an expected value to compare it to the actual value. However, if the IMS BMP program or DL/I Batch running live in IMS does file I/O, file stubs can still be used. This has only some limited value. There is great value in stubbing out the need for the IMS system and then call parameters can be validated as well as validation of EXEC DL/I ISRT, REPL, DLET.
Testing IMS MPP Programs using a Live IMS System is not supported by Total Test. The restrictions for supporting Live IMS for MPP Programs are too confining. The great value in being able to run an IMS MPP Program outside of an IMS System and being able to validate program calls and DL/I calls outweigh the low value of testing in a Live IMS MPP System.
Total Test Limitations for IMS MPP Test Data Capture
When running a debug session to record a Unit Test, Total Test will currently only capture the first MPP transaction. The Code Debug tool disables the PWFI indicator when the debug session is launched. This causes QC status (no more messages in the queue) to be returned on subsequent IMS GU calls.