Interface Selection for Test Case Generation - Run 1

Selecting the input interface and the observation interface

Initially, the interface definition for the new ATGConfiguration defines all event receptions of TheTestCalc to be used for test case generation. With this interface definition, ATG will stimulate class TheTestCalc by sending the pre-selected events with arguments according to the specified argument ranges.

a1

Note: The 'private' member operations of TheTestCalc can not be invoked from outside the class. Therefore, they aren't listed in the interface definition tab.

The 'Traced Instances and Messages' definition in the interface definition tab initially specifies, that ATG will trace all calls of operations and receptions of the test component instance of TestComponent TC_at_OutputsPt_of_TheTestCalc.

a1

The default coverage criterion is 'Model Element Coverage' of class TheTestCalc.

We are now ready to 'Generate Test Cases':

a1

ATG will prepare for test case generation and start generating test cases. After 1 minute (the default search time), ATG automatically stops generating test cases and stores the generated test cases. We now close the search dialog and get back to the main dialog:

a1

In the browser - below the ATGConfiguration - you now can find the model elements of TheTestCalc. A green hook in the icon of the respective model element means that the model element has been covered by a generated test case, whereas a red cross means, that no test case covering this model element has been generated.:

a1

In order to inspect test cases that cover particular model elements of interest, you can select the respective model element in the browser. Consider for example the test case covering state TestPlan in TestModel::TheTestCalc::TestBehaviorSpecification:

a1

What you can see here in frame 'Message Sequence' of the general tab is, that ATG covered this state without setting the operands 1 and 2 but only needed to set operation to 1 (which means +) and then computed addition with undefined operand registers. Even though, this is obviously a valid test case, it is not a complete functional test sequence for the calculator. The ATG tool does not have a notion of "complete functional test sequences". Instead, ATG always generates the "shortest possible test cases" to reach coverage.

Instead of inspecting the textual representation, you can export the test case e.g. as sequence diagram to rhapsody:

a1

You will find the sequence diagram scenario in package TPkg_TheTestCalc::TPkg_TheTestCalc_TPkg_TheTestCalc_Comp_DefaultConfig in the browser.

a1