Record Test Cases from an Xpediter/Eclipse Debugging Session


We recommend that you compile your program and provide current source listing (see also Compile Programs) before you generate a test.

When developers need to test any COBOL program behavior changes, they would initiate an Xpediter debug session to generate a test and validate their change.

  1. Restart debugging the program in Xpediter which stops at the main program entry.
  2. Find the sub-program for which to collect test data.
  3. Right-click and select image2021-8-16_16-42-34.pngRecord Test Case… on the Procedure section of the program on which to collect data. For more details, see to Context-Menus-from-Xpediter-Debug-Session.
  4. In the Record Test Case dialog box, select the program to be recorded and select an existing project or create a new project.
    Record Dialog - From Xpediter context menu.png
  5. To record, select either Record the program specified in launch configuration or Record a called program option. If Record a called program option is selected, enter the Program nameLoad module, and Maximum program executions to record field.
  6. Select the project from the Project drop-down or create a new one using the NEW button.
  7. Select a test folder from the Folder drop-down or enter a new folder name.
  8. In the Scenario drop-down, the last scenario specified for this program is pre-selected. Otherwise, a new scenario is displayed, using the name of the program with the suffix _Scenario (<program>_Scenario), for example, CWKTVSKS_Scenario.
  9. Optionally, you may specify the project's test suite into which the recorded test scenario will be copied.
  10. Select which test to record, either Unit Test (Virtualized Test - default), Functional Test (Non-virtualized Test), or both.

    Warning

    Important

    The Functional Test selection is only available when using a Repository Server (Window > Preferences > Compuware > Topaz for Total Test > Repository Server with check box Use repository server.)

  11. If you selected Functional Test, select the Host connection from the Functional TestEnvironment drop-down list. Use the Configure button to add or modify a connection.

    Warning

    Important

    The Unit TestOptions tab includes fields and settings specific for generating Unit Test test cases. Refer to Context-Menus-from-Xpediter-Debug-Session for detailed descriptions.

  12. Click OK to create the test case.
  13. If so desired, use the Xpediter session to change variable values at this point.
  14. Issue the appropriate Run commands in your Xpediter debug session. Xpediter collects and saves the program entry data from the structure specified by the Using Statements.
  15. Xpediter continues executing the rest of the program. For a Data Stub to be created, at least one Read or one Write must be executed in Xpediter during data collection. When the program ends or is stopped, Xpediter transfers the collected data to Topaz for Total Test.
  16. The new Test Scenario(s) appear in the Test Project previously specified. Select the new Test Scenarios in the Test Project Explorer View. Topaz for Total Test populates the project folders with the transferred data.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC Compuware Topaz Workbench 20.09