Simulator Tester

The Sim Tester is both:

On this page, I will describe the tester as it has been released to you: complete in the framework, but incomplete in test coverage. You may use it to test your simulator or as a platform on which to write your own tests. Either way, please report any problems you encounter so that we can get them straightened out.

Test Descriptions

The tests are broken down by STEAL state:

Note that the test descriptions are simple, terse and written in English (not Java). You may use them as examples of how to design and describe your own tests.

Running Tests

To run the Simimulator Tester download the executable JAR file and, if you don't already have them, the three needed libraries:

Writing Tests

Implementing tests with the Sim Tester framework is a (relatively) straightforward task. Most tests look like this:

/** Red asks for an invalid side. */
public void testInvalidSideRequest()
   throws IOException, NetworkException, ProtocolError
   red.sendLine("requestSide 2");
   blue.sendLine("requestSide 1");

   new ErrorResponse(red);
   new ErrorResponse(blue);

Of course, the framework underlying these tests is more complicated. Take a look at the framework page for more information.