15.2. Test Execution

The entire testing and verification process of a domain can be automated. Each test can be set up, run, and verified automatically so that we can run tests frequently—ideally with every change. We can also add new test cases as we change the models.

First, we show how to establish a unit test for a single activity in a use case. For each test vector, we need to establish the initial state of the model, accept the external signal that signifies the use case, and execute to see what happens. We then evaluate the outcome to see if it is correct.

The state of the system that must exist prior to the test is defined in terms of a set of objects, the values of their attributes, their current states, and any required associations. ...

Get Executable UML: A Foundation for Model-Driven Architecture now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.