Abstract

This chapter focuses on the reasons why unit test automation is necessary and how automated unit tests can be realized, by formulating a few requirements to an automation framework, and by showing how they can be implemented in JUnit. It is an Open Source framework for the automation of unit tests under Java, which was originally written by Kent Beck and Erich Gamma. There is no doubt that JUnit has become a quasi-standard tool for Java unit testing. It is a pure Java framework and test cases are created in a separate class hierarchy, using the junit, framework.TestCase—base class. JUnit allows movement of the common features of tests to a setUp () method, which is executed separately for each test, which means that the test carries on in order. Assert methods serve for unique verification of the test results and graphical test runners show successful test runs in green and failed test runs in red. For these reasons, JUnit is ideally suited for use as an automation tool to automate developer-side component tests.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call