Civil Engineering Reference
In-Depth Information
Fig. 6.18  Invariant tests check the communication and behaviour of the SUT
condition can also be made to depend on a specific bus state, and the invariant test
can be started at a later point in time if desired. The actual test consists of constant
monitoring of the invariant condition while the SUT is subjected to different situa-
tions. The latter can be done, e.g. by employing a defined “drive cycle” or by con-
ducting a real test drive. The test is passed when the condition is not violated at any
time (see Fig. 6.18 ). Invariants can be derived from the specification for the SUT,
since they essentially describe its properties.
In this testing strategy, stimulation and check conditions are independent of one
another and can be developed separately. When developing the stimulation, it is
important to run through all the possible types of operational situation as well as all
exceptional situations to the fullest extent possible (code coverage, feature cover-
age, etc.). Developing the stimulation is relatively easy, since the reaction of the
ECU being tested does not need to be interpreted. A stimulation sequence can also
contain random elements (catchphrase: “playing with the controls”); however, this
impacts the repeatability of the test and makes planning test coverage more diffi-
cult. On the other hand, random sequences often lead to the identification of errors
that may not have been considered by anyone until then. A certain degree of ran-
domness in such tests is therefore advisable, and is certainly unavoidable in real-life
environments such as road tests.
Defining sensible invariant conditions can be a tricky task, especially when the
goal is to guarantee a wide range of ECU functionality. This is because it is often
the case that only a portion of the invariant conditions can be derived from the exist-
ing formal specification. For this reason, it may often be preferable to run tests via
direct communication when testing complex sequences (see “Application Tests” in
Sect. 6.6.2).
Search WWH ::




Custom Search