PyModel is an open-source model-based testing framework in Python.
pmg [options] fsm
The single argument fsm is one finite state machine (FSM) module name (without the .py suffix). The FSM is typically produced by the PyModel Analyzer, pma. From the FSM, pmg generates a file of commands in the dot graph-drawing language. This .dot file can then be processed by the dot program in the Graphviz package from www.graphviz.org. Use the PyModel commands dotps, dotpdf, or dotsvg to run dot and produce PostScript, PDF, or SVG, respectively. SVG files can be viewed in a web browser.
Alternatively, pma, pmg, and a dot program can all be invoked by the pmv program, so analysis and display can be accomplished by a single command.
Control clutter in the graph with the
-l --transitionLabels option:
-l action shows the action name, arguments, and return value,
-l name shows only the action name, and
-l none shows no labels.
In the generated graphics, the initial state is gray. Accepting states have a double border. Unexplored or incompletely explored states are orange (these may have outgoing transitions that are not shown). Terminal states (with no outgoing transitions) that are accepting states are green. Terminal states that are not accepting states are yellow; runs that end in these states are considered failures.
In the browser, hover the pointer over a state to display a tooltip that shows the state variables and their values. Place the point of the pointer over any pixel on a transition vector to display a tooltip that shows the transition.
-h, --help show this help message and exit -o OUTPUT, --output=OUTPUT Output file name (not including .dot), default is <fsm argument> -l TRANSITIONLABELS, --transitionLabels=TRANSITIONLABELS Transition labels: action, name, or none, default is action -x, --noStateTooltip Omit tooltips from state bubbles (to work around dot svg problem)