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:
-
create a new SD TestCase for TestContext TCon_TheTestCalc
-
In the new TestScenario we move the instances graphically to a more intuitive order
-
We add messages, map their realization
-
Values for the arguments are defined
Finally, we e.g. could have created a manual TestCase testing multiple redefinition of operands before sending evCompute() as in the following figure: