Download Pilot Project for Model Based Testing using Conformiq Qtronic

Transcript
4.2.3 Test case control using QML functions
While the records, ports, system blocks and state machines are used in order to create
the models, QML also contains a number of predefined functions used to ensure a
better test suite from a model.
requirement
A requirement is a function that adds a coverage goal to a model. The requirement is
called with a unique string as argument, which, when read by Qtronic, adds a new test
goal to the coverage editor. The string can be expressed in a hierarchical manner
using a / character. For example, "Signal rejected/timeout" and "Signal rejected/bad
values" are two events that both represent a rejected signal, but due to two different
reasons. This hierarchy can be found in the Coverage Editor.
Figure 14. Coverage Editor showing requirement hierarchy.
assert
An assert is a function which checks that a supplied condition is true. They will often
be placed in a model at locations where the supplied argument logically never should
be anything but true. Its main function is to check if fallacies exist in the model.
For example, if a function always is supposed to be called with the integer argument
intA less than two, the assert call in the function might look like this:
Figure 15. The function lowInteger with assert.
29 (67)