Commit a9b6fb7f authored by Kisslinger's avatar Kisslinger
Browse files

Adding help for the refinement module

parent ac37e3eb
......@@ -6,7 +6,7 @@
@author becker
@author $Author$
@version $Rev$
@ConQAT.Rating YELLOW Hash: D1ADFD4F724B3A3A5EEA58EEA1AC6A66
@ConQAT.Rating YELLOW Hash: 7830765F7265318CAF8978470ED61413
-->
<html>
......@@ -51,7 +51,7 @@ AF3 integrates a model-based testing framework with the following features:
<li> <b>Step 4</b> - The generated test suites will be listed under the component.
</ul>
<h3><font color="#336699">Simulate Test Case</font></h3>
<h3><font color="#336699"><a name="simulate">Simulate Test Case</a></font></h3>
<ul>
<li> <b>Step 1</b> - Open a test suite and select a test case.
<li> <b>Step 2</b> - Right click on the test case in the editor and select "Run Test Case Simulator".
......@@ -82,5 +82,96 @@ AF3 integrates a model-based testing framework with the following features:
<li> <b>Step 3</b> - A new test suite will be created by AF3 with the same inputs and re-computed outputs.
</ul>
<h3><font color="#336699">Refinement Tests</font></h3>
With a refinement specification it can be tested whether a concrete (implemented) component shows the same behavior as an abstract component or a functional specification.
Steps to create a refinement test suite:
<ul>
<li> <b>Step 1</b> - Right click on the concrete component in the model navigator and select "Refinement Specification"
to create a refinement specification for it.
<br>
<br>
<img src="./pictures/Testing.Refinement.create_refinement_specification.png">
<br>
<br>
The refinement specification should then automatically be opened.
<li> <b>Step 2</b> - In the opened refinement specification click on the "Choose” button and select in the following dialog
the abstract component of which the concrete component should be a refinement.
<br>
<br>
<img src="./pictures/Testing.Refinement.choose_abstract_button.png">
<br>
<img src="./pictures/Testing.Refinement.choose_abstract_dialog.png">
<br>
<br>
After choosing the abstract component the representation and interpretation functions for the refinement specification are automatically generated. Their purpose is to specify the mapping of the input and output ports from the abstract to the
concrete component and the other way round (see picture below). If necessary they can transform the values.
<br>
<br>
<img src="./pictures/Testing.Refinement.picture_functions.png">
<br>
<br>
<li> <b>Step 3</b> Expand the refinement specification in the model navigator to see the functions node. Expand again the functions node to
see the refinement and interpretation functions.
<br>
<br>
<img src="./pictures/Testing.Refinement.functions.png">
<br>
<br>
If you double click on the functions node it is opened in the editor and you can see
the input and output ports which the representation and interpretation functions have.
<li> <b>Step 4</b> Create a behavior specification (e.g. code specification, automaton specification etc.) for the representation and
interpretation functions, like for a normal component. The behavior of the function should map its input ports to its output ports.
A simple example for such behavior definition is the following code specification, which directly maps Input1 of the abstract component to Input1
of the concrete component.
<br>
<br>
<img src="./pictures/Testing.Refinement.code_spec.png">
<br>
<br>
<li> <b>Step 4 b</b> Instead of using the abstract input you can also assign random values to certain inputs ports of the concrete component
for which the values cannot be derived from the abstract input. To use random input for one input port check the "Use random value" checkbox for
the port in the refinement specification editor.
<br>
<br>
<img src="./pictures/Testing.Refinement.random_input.png">
<br>
<br>
Then additional input fields will be shown in which you can specify details for the random value creation.
<li> <b>Step 5</b>
After specifying all port mappings or setting the input ports to random values you can now test if the concrete component is a correct
refinement of the abstract component. To run the test right click of the refinement specification in the model navigator and select
"Test Refinement".
<br>
<br>
<img src="./pictures/Testing.Refinement.test_refinement.png">
<br>
<br>
In the following dialog you have to choose a test suite of the abstract component. The input values of the abstract test suite will be used
as input for the refinement test and the interpreted output will be compared to the output of the abstract test suite.
After choosing the abstract test suite a refinement test suite will be generated:
<br>
<br>
<img src="./pictures/Testing.Refinement.refinement_test_suite.png">
<br>
<br>
It shows the test values in the following order: abstract input, concrete input (result of the representation function or random values),
concrete output, abstract output compared with the interpreted output(listed as "simulated value" if different).
If the compared outputs do not match in one test step, it and the parent test case and test suite will be marked with an error symbol.
<br>
<br>
The test cases in the refinement test suite can be also simulated on the model, like described in <a href ="#simulate">"Simulate Test Case"</a>.
</ul>
</body>
</html>
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment