The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
<html>
<head>
	<title>Wiki: Example Tests</title>
<head>
<body bgcolor=#FFFFFF link=#d06040 vlink=#806040>
	<h1>Example Tests</h1>
	<wiki>These are examples that you can view and run from this site right now.
<p><UL>
<li> SimpleExample -- Start here. This test checks floating-point division using a five-line fixture.
<p><li> CalculatorExample -- This test checks an HP-35 calculator simulator with assorted tables, all using the same column fixture. This includes a model based test generator.
<p><li> MusicExample -- Iinspired by Apple's iTunes, we test browsing of a music library using a combination of ActionFixture and RowFixture.
<p><li> WebPageExample -- We use a fixture to browse the web. The Page fixture hosts actions for ActionFixture and produces rows as a RowFixture.
<p><li> AllPairsExample -- These fixtures find and run other tests. Wildcard searches produce lists which are run in order, run in all combinations and run in all pair-wise combinations.
<p></UL>
These are examples that are still in development.
<p><UL>
<li> NetworkExample -- This tests a simulated radio network using action fixtures.
<p><li> TimeClockJobStatusExample -- This tests a GUI application with action and row fixtures. Compare this with ruby script tests for the same application.
<p></UL>
<hr>
<p>We use these examples for testing new implementations. Here is an example that runs the other examples.  Click <a href="run.cgi">http:run.cgi</a> to perform this test.
<p><table BORDER CELLSPACING=0 CELLPADDING=3>
<tr><td ColSpan=6> eg.ExampleTests </td></tr>
<tr><td> file </td><td> wiki </td><td> right() </td><td> wrong() </td><td> ignores() </td><td> exceptions() </td></tr>
<tr><td> arithmetic.html </td><td> false </td><td bgcolor="#ffcfcf">37 <font size=-1 color="#c08080"><i>expected</i></font><hr>40 <font size=-1 color="#c08080"><i>actual</i></font></td><td bgcolor="#ffcfcf">10 <font size=-1 color="#c08080"><i>expected</i></font><hr>8 <font size=-1 color="#c08080"><i>actual</i></font></td><td> 0 </td><td bgcolor="#ffcfcf">2 <font size=-1 color="#c08080"><i>expected</i></font><hr>1 <font size=-1 color="#c08080"><i>actual</i></font></td></tr>
<tr><td> CalculatorExample.html </td><td> true </td><td> 75 </td><td bgcolor="#ffcfcf">9 <font size=-1 color="#c08080"><i>expected</i></font><hr>8 <font size=-1 color="#c08080"><i>actual</i></font></td><td> 0 </td><td bgcolor="#ffcfcf">0 <font size=-1 color="#c08080"><i>expected</i></font><hr>1 <font size=-1 color="#c08080"><i>actual</i></font></td></tr>
<tr><td> MusicExample.html </td><td> true </td><td bgcolor="#ffcfcf">95 <font size=-1 color="#c08080"><i>expected</i></font><hr>91 <font size=-1 color="#c08080"><i>actual</i></font></td><td bgcolor="#ffcfcf">0 <font size=-1 color="#c08080"><i>expected</i></font><hr>4 <font size=-1 color="#c08080"><i>actual</i></font></td><td> 0 </td><td> 0 </td></tr>
<tr><td> MusicExampleWithErrors.html </td><td> true </td><td bgcolor="#ffcfcf">54 <font size=-1 color="#c08080"><i>expected</i></font><hr>40 <font size=-1 color="#c08080"><i>actual</i></font></td><td bgcolor="#ffcfcf">10 <font size=-1 color="#c08080"><i>expected</i></font><hr>61 <font size=-1 color="#c08080"><i>actual</i></font></td><td bgcolor="#ffcfcf">0 <font size=-1 color="#c08080"><i>expected</i></font><hr>120 <font size=-1 color="#c08080"><i>actual</i></font></td><td> 0 </td></tr>
<tr><td> NetworkExample.html </td><td> true </td><td bgcolor="#ffcfcf">5 <font size=-1 color="#c08080"><i>expected</i></font><hr>4 <font size=-1 color="#c08080"><i>actual</i></font></td><td> 0 </td><td> 0 </td><td bgcolor="#ffcfcf">0 <font size=-1 color="#c08080"><i>expected</i></font><hr>3 <font size=-1 color="#c08080"><i>actual</i></font></td></tr>
<tr><td> AllFiles.html </td><td> true </td><td bgcolor="#ffcfcf">9 <font size=-1 color="#c08080"><i>expected</i></font><hr>6 <font size=-1 color="#c08080"><i>actual</i></font></td><td bgcolor="#ffcfcf">3 <font size=-1 color="#c08080"><i>expected</i></font><hr>6 <font size=-1 color="#c08080"><i>actual</i></font></td><td> 0 </td><td> 0 </td></tr>
<tr><td> AllCombinations.html </td><td> true </td><td> 80 </td><td> 6 </td><td> 0 </td><td> 0 </td></tr>
<tr><td> AllPairs.html </td><td> true </td><td> 45 </td><td> 3 </td><td> 0 </td><td> 0 </td></tr>
</table>
<p>We are only testing that we get the expected counts of right and wrong. There are twenty of these count comparisions above. But there are actually many more tests preformed. This fixture adds an extra line to the summary so that we can feel good even though LessonsLearned advises us not to base our confidence on test counts which are easily inflated.
<p><table BORDER CELLSPACING=0 CELLPADDING=3>
<tr><td ColSpan=2> fit.Summary </td></tr>
<tr bgcolor="#ffcfcf">
<td> <font color="#808080">counts</font></td>
<td> <font color="#808080">0 right, 14 wrong, 0 ignores, 0 exceptions</font></td></tr>
<tr>
<td> <font color="#808080">input file</font></td>
<td> <font color="#808080">input/ExampleTests.html</font></td></tr>
<tr>
<td> <font color="#808080">input update</font></td>
<td> <font color="#808080">Sat Apr 22 22:26:16 2006</font></td></tr>
<tr>
<td> <font color="#808080">output file</font></td>
<td> <font color="#808080">output/ExampleTests.html</font></td></tr>
<tr>
<td> <font color="#808080">run date</font></td>
<td> <font color="#808080">Wed May &nbsp;3 18:10:54 2006</font></td></tr>
<tr>
<td> <font color="#808080">run elapsed time</font></td>
<td> <font color="#808080"> 0 wallclock secs ( 0.01 usr &nbsp;0.02 sys + &nbsp;0.00 cusr &nbsp;0.01 csys = &nbsp;0.03 CPU)</font></td></tr></table>
<p>See the fixture: <a href="Release/Source/eg/ExampleTests.java">http:Release/Source/eg/ExampleTests.java</a></wiki>
<hr>
	Last edited April 20, 2003
</body>
</html>