

Your JUnit test may contain the following, assertTrue(“Testing hello!”, someString, “hello”) where if someString = “hello”, this JUnit test would pass. As a very basic example, let’s say that your software specification and requirements asks you to write a program that prints out the word, “hello”. So when writing JUnit tests, a question you may ask is, what should I test? The answer is, you can do what is called “black box testing” or “white box testing.” Black box testing involves writing tests to test for specification and requirements. Unit tests allow you to incrementally test your program as it slowly evolves and gets developed over time. The JUnit framework allows the creation of what are called unit tests on your source code. Essentially this tool measures the degree to which the source code of a program has been covered by JUnit tests. Jacoco is a standard technology tool used for code coverage in Java VM based environments. We will also be using an automated quality assurance tool called Jacoco and a software testing framework called JUnit. In this posting we put Checkstyle, PMD, and FindBugs into action with a competitive Robocode robot that was written by me.

As you know, automatic quality assurance tools involve the use of various programs that can automatically be run during the software development phase in order to check if coverage of both the low level and high level software quality characteristics are satisfied. Last time, we talked about the three automated quality assurance tools.
