How to generate offline test sequences
An offline test sequence, is
a sequence of edges and vertices extracted from a
given graph by mbt,
and written to the standard output. The are two important
options that has to be set: the stop-condition
and the generator. In
this article, we'll go through some different examples.
Generator - RANDOM
Stop-condition - TEST_LENGTH
This example will demonstrate how to generate a test sequence
using the random generator, limiting the length of the test.
$> java -jar mbt.jar offline -f model.graphml -g RANDOM -s TEST_LENGTH:10
e_Initialize
v_KeePassNotRunning
e_Start
v_MainWindowEmpty
e_CloseApp
v_KeePassNotRunning
e_StartWithDatabase
v_EnterMasterCompositeMasterKey
e_EnterCorrectKey
v_MainWindow_DB_Loaded
e_CloseDB
v_MainWindowEmpty
e_CloseApp
v_KeePassNotRunning
e_Start
v_MainWindowEmpty
e_CloseApp
v_KeePassNotRunning
e_StartWithDatabase
v_EnterMasterCompositeMasterKey
Generator - RANDOM
Stop-condition - EDGE_COVERAGE 30%
This example will demonstrate how to generate a test sequence
using the random generator, and stop the execution when 30% coverage of the edges are reached.
$> java -jar mbt.jar offline -f graphml/reqtags/ -g RANDOM -s EDGE_COVERAGE:30
e_Initialize
v_KeePassNotRunning
e_StartWithDatabase
v_EnterMasterCompositeMasterKey
e_EnterInvalidKey
v_InvalidKey
e_CloseDialog
v_MainWindowEmpty
e_CloseApp
v_KeePassNotRunning
e_Start
v_MainWindowEmpty
Generator - SHORTEST
Stop-condition - EDGE_COVERAGE 100%
This example will demonstrate how to generate a test sequence
using the shortest path generator, and stop the execution when 100% coverage of the edges are reached.
$> java -jar mbt.jar offline -f graphml/reqtags/ -g SHORTEST -s EDGE_COVERAGE:100
e_Initialize
v_KeePassNotRunning
e_Start
v_MainWindowEmpty
e_CloseApp
v_KeePassNotRunning
e_StartWithDatabase
v_EnterMasterCompositeMasterKey
e_EnterInvalidKey
v_InvalidKey
e_CloseDialog
v_MainWindowEmpty
:
: