Testing Document

Several forms of testing were performed to guarantee the correctness of the algorithm and the good performance of the applet. At the lowest level, many unit tests were executed on the code. In fact, all methods not directly related to the user interface were tested using JUnit. A total of 143 unit tests were implemented.

Running unit tests is helpful, but it is important to know if all the code has been tested. In other words, it does not help to test 5% of the code with lots of duplicate tests. To verify the code was unit tested thoroughly, EclEmma was used to test code coverage. Together with JUnit, EclEmma guaranteed that nearly 100% of the code was unit tested successfully.

coverage.jpg

Test Data and I/O

At a higher level, the applet was tested using a number of test cases. Most cases were provided by the instructor, but others were created to gain confidence that the algorithm solves all possible graphs optimally.

The following test cases were run, and you can click any of the following links to execute them. After the applet appears, it will automatically download and attempt to solve the graph. Keep in mind that applets cannot access files on different servers, and these test cases are on located on uhunix2. This means many of the following tests will not run succesfully when the applet is executed from a file system path. All tests do run and produce the expected output, however, from my site.

Functionality of a Component Grabing Input Data

Functionality of a Component Executing the Chosen Algorithm

Other Considerations

Many small graphs were created and solved manually and were compared to the results of the applet. For all cases, the solutions match the expected output. Large cases are difficult to solve manually, but after so much thorough testing of the applet, I am extermely confident that the results it displays are accurate. Unit testing, functional testing, and user testing have all been performed, and the applet performs as expected.

Links

Valid HTML 4.01 Valid CSS