-
Notifications
You must be signed in to change notification settings - Fork 16
Visualization for Execution Paths
The tool supports a technique to measure and visualize execution paths of test cases in the context of MBT (requiring graphviz). It provides visual feedback of the tests, their coverage and diversity by two types visualizations for path coverage, so-called state-based graphs (SGs) and path-based graphs (PGs).
The state-based graphs provide a better sense of the behavior of a system, as it is a refinement of the extended finite state machine. The path-based graphs only show executed paths to indicate the number of linearly independent paths.
The visual feedback can help users of the tool to understand to what degree the model and the SUT are executed by the generated test cases, and to understand execution traces and locate weaknesses in the coverage of the model.
This feature can be enabled by using
scala modbat.jar --dotify-path-coverage <model>
The output files are dot files, including <modelname-root-StateGraph>.dot
as
a state-based graph (SG) and <modelname-root-PointGraph>.dot
as a path-based graph (PG).
The user of the tool need to choose the output abstracted graphs (SG/PG) by using
--path-coverage-graph-mode=abstracted
, or full graphs (FSG/FPG)(graphs without abstractions used)
by using --path-coverage-graph-mode=full
.
The destination directory can be changed using --dotDir=...;
default is the current directory.
Example:
modbat/build$ scala modbat.jar --classpath=modbat-examples.jar \
-n=1 -s=2455cfedeadbeef \
--no-redirect-out \
--dotify-path-coverage \
--path-coverage-graph-mode=abstracted \
modbat.examples.SimpleModel
Reference