Adding Manual Tests

Manually implementing test cases or editing automatically generated test cases

Of course, automatically generated test cases can arbitrarily be combined or completed with manually designed test cases.

In order to implement a sequence diagram TestCase manually, we right-click TestContext TCon_TheTestCalc in the Rhapsody browser and choose Create SD TestCase. Upon creation the sequence diagram defining the test opens and we can add messages according to our desires. Of course, the same editing can also be done in automatically generated test cases. You can delete messages, add messages, delete entire instances lines, e.t.c.

It might be of special interest to add certain scenarios as manual TestCases that aren't concerned by auto generated test cases. In order to e.g. add a TestCase that overrides the operands several times with different values before invoking computation, we:

  1. create a new SD TestCase for TestContext TCon_TheTestCalc

    run

  2. In the new TestScenario we move the instances graphically to a more intuitive order

    run

  3. We add messages, map their realization

    run

  4. Values for the arguments are defined

    run

Finally, we e.g. could have created a manual TestCase testing multiple redefinition of operands before sending evCompute() as in the following figure:

run

Note: Although this test scenario does increase the quality of the test suite it does not increase the achieved test model coverage. Remember we already covered the complete test model with the test cases generated with ATG. Nonetheless this scenario provides increased path coverage of the test model. Hence, it improves the later testing of the implementation.