
152 Model-Based Testing for Embedded Systems
We do not want to just generate lots of test sequences; we also want to be able to
execute each test sequence on a SUT and automatically determine whether the test has
passed or failed. There are two ways we can do this. For methods that return results, we
can annotate each transition of our state diagram with the expected result of each method
call. For example, the add(s1) transition from the empty state should return true because
the s1 string was not a member of the empty set—so we could write this transition as
add(s1)/true to indicate the expected result.
The other way of checking whether a test sequence ...