Skip to content

Commit 4aebdf6

Browse files
committed
www directory: revise index.html, add more pages
in www add notes.html and samples.html generated based on README.md also add pmv.html based on pmv -h output also tweak PyModel/README.md yet again
1 parent f258760 commit 4aebdf6

File tree

5 files changed

+321
-46
lines changed

5 files changed

+321
-46
lines changed

README.md

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,26 @@
22
PyModel: Model-based testing in Python
33
======================================
44

5-
**PyModel** is a model-based testing framework in Python.
5+
**PyModel** is an open-source model-based testing framework in Python.
66

77
In model-based testing, you code a *model* that can generate as many
8-
test cases as desired and also acts as the oracle that checks the test
9-
outcomes. Model-based testing is helpful where so many test cases are
10-
needed that it is not feasible to code them all by hand.
8+
test cases as needed. The model also checks the test outcomes.
9+
Model-based testing is helpful where so many test cases are needed
10+
that it is not feasible to code them all by hand.
1111

12-
The samples included with PyModel include models and test scripts for
13-
network sockets, a communication protocol, embedded controllers, data
14-
structures, a multithreaded application, and a web application.
12+
In the samples included with PyModel, there are models and test
13+
scripts for network sockets, a communication protocol, embedded
14+
controllers, some data structures, a multithreaded application, and a
15+
web application.
1516

1617
PyModel includes an analyzer for validating models, visualizing their
1718
behavior, and checking their safety properties.
1819

1920
PyModel can generate *offline tests* which are similar to unit tests,
2021
but the typical way to use PyModel is *on-the-fly testing*, where the
21-
test runner uses the model to compute the test run as it executes.
22-
On-the-fly testing can cope with nondeterminism and asynchrony in the
23-
system under test.
22+
test runner uses the model to compute the test run as it executes, so
23+
test runs can be as long as needed. On-the-fly testing can cope with
24+
nondeterminism and asynchrony in the system under test.
2425

2526
PyModel can combine models using *composition*, guide tests through
2627
programmed *scenarios*, and focus test coverage according to
@@ -46,9 +47,16 @@ There is also a fourth program:
4647
program provides brevity and convenience, so analysis and display
4748
can be accomplished by a single command.
4849

49-
For more information, read the [notes](notes), peruse the
50-
[talks](talks), browse the [code](pymodel), or try the
51-
[samples](samples). There are README files in most of the directories.
50+
Use *pma* and *pmg* (or *pmv*) to visualize and preview the behavior of *pmt*.
51+
Every path through the graph created by *pma* (and drawn by *pmg*) is a
52+
trace (test run) that may be generated by *pmt*, when *pma* and *pmt* are
53+
invoked with the same arguments. The *pma* program is also useful on
54+
its own for visualization and safety analysis.
55+
56+
For more information, read the [notes](notes), browse the
57+
[code](pymodel), peruse the [talks](talks),
58+
or try the [samples](samples). There are README files in most of the
59+
directories.
5260

5361
PyModel is also available at
5462
[PyPI](http://pypi.python.org/pypi/PyModel).

www/index.html

Lines changed: 47 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -8,69 +8,79 @@
88

99
<h2>PyModel: Model-based testing in Python</h2>
1010

11-
<p>
12-
<a href="http://staff.washington.edu/jon/">Jonathan Jacky</a>
13-
1411
<hr>
1512

1613
<p>
1714
<b>PyModel</b> is an open-source model-based testing framework in Python.
1815

1916
<p>
20-
In unit testing, the programmer codes the test cases, and also codes
21-
assertions that check whether each test case passed. In model-based
22-
testing, the programmer codes a "model" that generates as many test
23-
cases as desired and also acts as the oracle that checks the cases.
17+
In model-based testing, you code a <em>model</em> that can generate as
18+
many test cases as needed. The model also checks the test outcomes.
19+
Model-based testing is helpful where so many test cases are needed
20+
that it is not feasible to code them all by hand.
21+
22+
<p>
23+
In the samples included with PyModel, there are models and test
24+
scripts for network sockets, a communication protocol, embedded
25+
controllers, some data structures, a multithreaded application, and a web
26+
application.
2427

2528
<p>
26-
Model-based testing is recommended where so many test cases are needed
27-
that it is not feasible to code them all by hand. This need arises
28-
when testing behaviors that exhibit history-dependence and
29-
nondeterminism, so that many variations (data values, interleavings,
30-
etc.) should be tested for each scenario (or use case). Examples
31-
include communication protocols, web applications, control systems,
32-
and user interfaces.
29+
PyModel includes an analyzer for validating models, visualizing their
30+
behavior, and checking their safety properties.
3331

3432
<p>
35-
PyModel supports on-the-fly testing, which can generate indefinitely
36-
long nonrepeating tests as the test run executes. PyModel can focus
37-
test cases on scenarios of interest by composition, a versatile
38-
technique that combines models by synchronizing shared actions and
39-
interleaving unshared actions. PyModel can guide test coverage
40-
according to programmable strategies coded by the programmer.
33+
PyModel can generate <em>offline tests</em> which are similar to unit
34+
tests, but the typical way to use PyModel is <em>on-the-fly
35+
testing</em>, where the test runner uses the model to compute the test
36+
run as it executes, so test runs can be as long as needed. On-the-fly
37+
testing can cope with nondeterminism and asynchrony in the system
38+
under test.
39+
40+
<p>
41+
PyModel can combine models using <em>composition</em>, guide tests through
42+
programmed <em>scenarios</em>, and focus test coverage according to
43+
programmed <em>strategies</em>.
44+
4145

4246
<p>
43-
PyModel provides three programs:
47+
PyModel provides three main programs:
4448

4549
<ul>
46-
<li><a href="pma.html">pma.py</a> &nbsp; PyModel analyzer: generates a finite state machine (FSM) and computes properties by exploring a model program, FSM, test suite, or a product of these.
47-
<li><a href="pmg.html">pmg.py</a> &nbsp; PyModel graphics: generates a file of graphic commands from an FSM.
48-
<li><a href="pmt.html">pmt.py</a> &nbsp; PyModel tester: displays traces, generates tests offline, executes offline tests, or generates and executes tests on-the-fly.
50+
<li><a href="pma.html">pma</a> &nbsp; PyModel analyzer: generates a finite state machine (FSM) and computes properties by exploring a model program, FSM, test suite, or a product of these.
51+
<li><a href="pmg.html">pmg</a> &nbsp; PyModel graphics: generates a file of graphic commands from an FSM.
52+
<li><a href="pmt.html">pmt</a> &nbsp; PyModel tester: displays traces, generates tests offline, executes offline tests, or generates and executes tests on-the-fly.
4953
</ul>
5054

5155
<p>
52-
There is also a fourth program, <a href="pmv.html">pmv.py</a>, the
53-
PyModel viewer, that invokes pma, pmg, and
56+
There is also a fourth program:
57+
58+
<ul>
59+
<li><a href="pmv.html">pmv</a>, PyModel viewer: invokes pma, pmg, and
5460
the <a href="http://www.graphviz.org/">Graphiz dot</a> command (to
5561
display the graphics generated by pmg). The pmv program provides
5662
brevity and convenience, so analysis and display can be accomplished
5763
by a single command.
64+
</ul>
5865
</p>
5966

6067
<p>
6168
Use pma and pmg (or pmv) to visualize and preview the behavior of pmt.
6269
Every path through the graph created by pma (and drawn by pmg) is a
6370
trace (test run) that may be generated by pmt, when pma and pmt are
64-
invoked with the same arguments.
71+
invoked with the same arguments. The pma program is also useful on
72+
its own for visualization and safety analysis.
6573

6674
<p>
67-
For more information, peruse the <a href="../talks">talks</a>,
75+
For more information,
6876
read the <a href="concepts.html">overview</a> and
69-
the more detailed <a href="../notes">notes</a>, browse
77+
the more detailed <a href="notes.html">notes</a>, browse
7078
the <a href="../pymodel">code</a>,
79+
peruse the <a href="../talks">talks</a>,
7180
view the <a href="../samples/Stack/svg">graphs</a>
7281
(<a href="../samples/WebApplication/svg">etc.</a>)
73-
or try the <a href="../samples">samples</a>.
82+
or try the <a href="samples.html">samples</a>.
83+
There are README files in most of the directories.
7484

7585
<p>
7686
Here are the <a href="../talks/pymodel-nwpd10.pdf">slides</a> for
@@ -89,7 +99,7 @@ <h2>PyModel: Model-based testing in Python</h2>
8999
and <a href="https://github.com/jon-jacky/PyModel">GitHub</a>.
90100

91101
<p>
92-
PyModel requires Python 2.6 (because it uses <code>itertools.product</code>).
102+
PyModel requires Python 2.6 or later (because it uses <code>itertools.product</code>).
93103

94104
<p>
95105
PyModel is influenced by <a
@@ -100,11 +110,15 @@ <h2>PyModel: Model-based testing in Python</h2>
100110
PyModel is covered by the
101111
<a href="http://www.opensource.org/licenses/BSD-3-Clause">
102112
BSD License</a>.
103-
Code and documents are copyright (C) 2009, 2010, 2011 Jonathan Jacky.
113+
Code and documents are copyright (C) 2009-2013 by Jonathan Jacky.
104114

105115
<hr>
106116

107-
Revised July 2010
117+
<p>
118+
<a href="http://staff.washington.edu/jon/">Jonathan Jacky</a>
119+
120+
<p>
121+
Revised Apr 2013
108122

109123
</body>
110124
</html>

www/notes.html

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
<!DOCTYPE html>
2+
<html lang="en"><head>
3+
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
4+
<meta charset="utf-8">
5+
<title>Notes on PyModel</title>
6+
7+
8+
</head>
9+
<body>
10+
<div class="page">
11+
12+
<div class="previewPage">
13+
<div id="readme" class="announce md">
14+
<article class="markdown-body entry-content">
15+
<h1>Notes on PyModel</h1>
16+
17+
<p>
18+
<a href="index.html">PyModel</a> is an open-source model-based testing
19+
framework in Python.
20+
21+
<hr>
22+
23+
<p>The <a href="../notes">notes</a> directory contains some of the
24+
PyModel documentation. See also the <em>README</em> files in each
25+
directory, the slides and papers in
26+
the <a href="../talks"><em>talks</em></a> directory, and the web pages
27+
in the <a href="../www"><em>www</em></a> directory.</p>
28+
29+
<p>These are the files in the <em>notes</em> directory, in a recommended<br>
30+
reading order:</p>
31+
32+
<ul>
33+
<li><p><em>concepts.md</em>: concepts and vocabulary</p></li>
34+
<li><p><em>commands.txt</em>: PyModel commands and how to use them. Also,<br><em>pma.txt</em>, <em>pmg.txt</em>, <em>pmt.txt</em>, and <em>pmv.txt</em> on each command.</p></li>
35+
<li><p><em>samples.txt</em>: where to find the samples and how to run them. See also<br>
36+
the <em>README</em> in the samples directory and in each sample subdirectory.</p></li>
37+
<li><p><em>models.txt</em>: how to write and use model programs, FSMs, and test suites</p></li>
38+
<li><p><em>composition.txt</em>: how and why to use composition to combine models</p></li>
39+
<li><p><em>strategy.txt</em>: how to select or write an optional strategy to guide test runs</p></li>
40+
<li><p><em>stepper.txt</em>: how to write the test harness needed to test an implementation</p></li>
41+
<li><p><em>test.txt</em>: how to script and run tests on the PyModel software itself</p></li>
42+
<li><p><em>advice.txt</em>: miscellaneous tips and advice</p></li>
43+
<li><p><em>socket_experiments.txt</em>: steppers and other files in the socket sample that<br>
44+
are not discussed in its <em>README</em></p></li>
45+
<li><p><em>releases.txt</em>: release history </p></li>
46+
<li><p><em>release-0.85.txt</em>: release notes</p></li>
47+
<li><p><em>release-0.9.txt</em>: release notes</p></li>
48+
</ul>
49+
50+
<hr>
51+
52+
</ul><p>Revised Apr 2013</p>
53+
</article>
54+
</div>
55+
</div>
56+
57+
<div>&nbsp;</div>
58+
59+
</div>
60+
61+
62+
</body></html>

www/pmv.html

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2+
"http://www.w3.org/TR/html4/loose.dtd">
3+
<html>
4+
<head>
5+
<title>PyModel Viewer</title>
6+
</head>
7+
<body>
8+
9+
<h2>PyModel Viewer</h2>
10+
11+
<!--
12+
<p>
13+
<a href="http://staff.washington.edu/jon/">Jonathan Jacky</a>
14+
-->
15+
16+
<p>
17+
<a href="index.html">PyModel</a> is an open-source model-based testing
18+
framework in Python.
19+
20+
<hr>
21+
22+
<p>
23+
Usage:
24+
</p>
25+
26+
<pre>
27+
pmv [options] models
28+
</pre>
29+
30+
<p>
31+
A single program that
32+
invokes <a href="pma.html">pma</a>, <a href="pmg.html">pmg</a>, and
33+
<a href="http://www.graphviz.org/">Graphviz dot</a> to to perform
34+
analysis, generate dot commands, and generate a file of graphics in
35+
.svg, .pdf or another format. The pmv program provides brevity and
36+
convenience, so analysis and display can be accomplished by a single
37+
command. This program accepts all of the command line options and
38+
arguments of both pma and pmg, and the -T option of dot (to select the
39+
graphics format), then passes the options to the appropriate program.
40+
</p>
41+
42+
<p>
43+
Options:
44+
</p>
45+
46+
<pre>
47+
-h, --help show this help message and exit
48+
</pre>
49+
50+
<p>
51+
Options passed to <a href="pma.html">pma</a>, PyModel analyser:
52+
</p>
53+
54+
<pre>
55+
-a ACTION, --action=ACTION
56+
Action to include in generated FSM, as many as needed,
57+
if no -a include all actions
58+
-e EXCLUDE, --exclude=EXCLUDE
59+
Action to exclude from generated FSM, as many as
60+
needed
61+
-m MAXTRANSITIONS, --maxTransitions=MAXTRANSITIONS
62+
Maximum number of transitions to include in the
63+
generated FSM, default 100
64+
-o OUTPUT, --output=OUTPUT
65+
Output file basename (before the .foo suffix), default
66+
is <first argument>FSM
67+
</pre>
68+
69+
<p>
70+
Options passed to <a href="pmg.html">pmg</a>, PyModel graphics:
71+
</p>
72+
73+
<pre>
74+
-l TRANSITIONLABELS, --transitionLabels=TRANSITIONLABELS
75+
Transition labels: action, name, or none, default is
76+
action
77+
-x, --noStateTooltip Omit tooltips from state bubbles (to work around dot
78+
svg problem)
79+
-y, --noTransitionTooltip
80+
Omit tooltips from transition arrows
81+
</pre>
82+
83+
<p>
84+
Options passed to <a href="http://www.graphviz.org/">Graphviz dot</a>:
85+
</p>
86+
87+
<pre>
88+
-T FILETYPE, --fileType=FILETYPE
89+
Graphics file type (format), default svg
90+
</pre>
91+
92+
<hr>
93+
94+
Revised Nov 2012
95+
96+
</body>
97+
</html>

0 commit comments

Comments
 (0)