labs / tiddlers / content / labs / lab03 /

That is the basics of testing. You now know:

  • How to drive tests using JUnit.
  • How to evaluate tests using Hamcrest.
  • How to drive and evaluate GUI tests using AssertJ Swing.
  • How to isolate dependant components using Mockito.

In Java land, JUnit and Hamcrest are the primary libraries that you will encounter. There are others, but those are the two big ones. AssertJ is the only library that we are aware of that can be used for testing Swing GUIs. Mockito is one of several mocking frameworks. Other languages have equivalents that behave in similar ways.

We are not done with testing in {{$:/ou/parameters/Paper Code}} yet. We will show you how to test persistent DAOs (that store data in a database), and web application/services in future labs and lectures. However, the above list of topics are the main topics that you need to know about automated testing --- what remains will just be building on those topics.