CSci 161
Notes on Unit Testing
Some notes on the unit test system (mostly from the tutorial on unit testing,
which can be found at
http://www.bluej.org/tutorial/testing-tutorial.pdf.
- To make the unit testing support visible, go to tools -> preferences ->
show testing tools
- Right-click on the class and select Create Test Class item (you can also
do this from the New Class button)
- From the ...Test class, select Create Test Method. "test" is
automatically inserted at the beginning of your name for the test.
Recording begins
- Go through the sequence of actions you want to happen in the test
(including any printing you want done).
- Click "End" to end the recording.
- To run a test, click the Run Tests button and select the test you want
to run from the list.
- There is more that can be done, so we will revisit the Unit Test option
as we go along.
Return to Course Home Page