Download Pilot Project for Model Based Testing using Conformiq Qtronic

Transcript
Figure 4.Example of a test case for a unit test.
The image above shows in a simplified form a unit test case where a function
(context) is called with a certain value (scenario) and returns something that is either
the expected result or something different (pass/fail criteria) .
Run test cases
The second step is to execute the test cases on the system. This is usually done using
an interface where the test cases can either be tested manually one by one or
automatically, for example by using a test script in a scripting language. Common
scripting languages include TCL, TTCN-3, and normal programming languages like
Java[5].
Script based testing is a good way to reduce testing time since the execution can be
automated. A test script will contain one or more test cases, and usually a way of
reaching the state where the test cases can be tested. For example, in order to get the
system to the point where a reconfiguration of settings can be tested, the system first
has to be initialised correctly[3].
Analyse the test results
The final step of the testing process is to make an analysis to ensure that the actual
results are the same as the expected results. For cases where the results differ the
cause has to be determined. It might have been the test case that was incorrect, either
because of incorrect data transmission or reception, or an internal fault in the SUT.
2.3.3 Coverage
Test coverage is a collective term for the types of coverage (see Table 1) that can be
tested on a system by a given test case or test suite. The different types of coverage
depend mainly on whether the tests are white box or black box[13].
White box test coverage
One example of white box test coverage is code coverage, which describes the degree
to which the code of the SUT is tested by a test suite, as a percentage of the entire
code. Since the code needs to be known for this type of coverage it can only be used
10 (67)