Exporting and Executing Test Cases

Exporting Test Cases to Rhapsody

We are now ready to export the test cases to Rhapsody:

Screen capture a1

Executing the test cases on the TestArchitecture which has been used for test case generation

After having exported the test cases to Rhapsody, we now close the ATG main dialog and return to the Rhapsody browser window in order to work with TestConductor. Back in the Rhapsody browser, we discover, that a new package has been created in the test architecture package containing the sequence diagram representation of the automatically generated test cases:

Screen capture a1

Accordingly, for each of these scenarios, a test case has been added to TestContext TPkg_TheTestCalc::TCon_TheTestCalc_Architecture::TCon_TheTestCalc for which we generated the test cases with ATG.

Screen capture a1

Note: In the description tab of the features dialog of each test case, you can find the information about how the TestCase contributed to the ATG model coverage.

We want to verify with TestConductor the approximated coverage reported by ATG and hence enable model coverage measurement for test case execution: In order to achieve this, we open the features dialog of the <<TestingConfiguration>> of the TestArchitecture:

a1

In the features dialog, we check tag ComputeModelCoverage:

a1

Now we can update, build, execute the TestContext (update, build are - if necessary - automatically performed before executing the TestContext)

a1

and answer the popup by clicking OK

a1

After successfully updating and building the TestContext, all test cases are executed in a sequence by TestConductor. The state of execution and the individual execution results are visualized in an execution window. After the execution, model coverage measurement reports are added to each individual TestCase in the browser as well as a summary model coverage report. You can open the report by double-clicking. When clicking a model element in the report, the respective model element will be highlighted in the Rhapsody model. As you can simply verify using the report, all model elements except for operation TheTestCalc::init, reception evReset, and transitions 2 in TheTestCalc::TestBehaviorSpecification and 4 in TheTestCalc::TestBehaviorSpecification are covered by the ATG test cases.