Example Tests


These are examples that you can view and run from this site right now.

  • SimpleExample -- Start here. This test checks floating-point division using a five-line fixture.

  • 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.

  • MusicExample -- Inspired by Apple's iTunes, we test browsing of a music library using a combination of ActionFixture and RowFixture.

  • WebPageExample -- We use a fixture to browse the web. The Page fixture hosts actions for ActionFixture and produces rows as a RowFixture.

  • 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.

These are examples that are still in development.

  • NetworkExample -- This tests a simulated radio network using action fixtures.

  • TimeClockJobStatusExample -- This tests a GUI application with action and row fixtures. Compare this with ruby script tests for the same application.


We use these examples for testing new implementations. Here is an example that runs the other examples. Click http:run.cgi to perform this test.

eg.ExampleTests
file wiki right() wrong() ignores() exceptions()
arithmetic.html false 37 10 0 2
CalculatorExample.html true 75 9 0 0
MusicExample.html true 95 0 0 0
MusicExampleWithErrors.html true 54 10 0 0
NetworkExample.html true 5 0 0 0
AllFiles.html true 9 3 0 0
AllCombinations.html true 80 6 0 0
AllPairs.html true 45 3 0 0

Ever wondered which fixtures are exercised in the examples? See FixturesInExamples.

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.

fit.Summary

See the fixture: http:Release/Source/eg/ExampleTests.java

 

Last edited October 23, 2005
Return to WelcomeVisitors