2.1 What Do We Want to Automate?


2.1 What Do We Want to Automate?

Automation is different depending on the test type, the test level, and the system type. For example, if we want to test the behavior of a server-based system under high load, we need some specific sort of tool. The ideal tool would allow us to send a certain number of jobs from several clients to that server and then to poll a number of parameters, such as response times, number of failed queries, storage consumption, and CPU load. In contrast, so-called capture/playback tools are often used to test graphic applications, allowing the recording and playback of interactions on user level, such as mouse movements, clicks, and keyboard inputs.

We are interested mainly in the automation of object-oriented unit tests. Such a test consists normally of the creation of one or more objects, bringing these objects into a specific initial state, feeding them with a number of messages, and finally checking for changes within the objects or impact on the environment (e.g., files). In other words, we are interested in creating a test driver.

While we have agreed on the test type we are interested in, we still have to think about different levels to which our test cases can refer:

  • Testing single methods. The side conditions here are mainly pre-and post-conditions of the methods (see Chapter 4, Section 4.7, Design by Contract).

  • Testing the protocol of a class. Typical scenarios for the use of instances play the most important role here (see Chapter 4, Section 4.3, Testing the Typical Functionality).

  • Testing the interaction between two or more objects (see Chapter 4, Section 4.6, Object Interactions).

Our hope is to be able to complete all these types of test levels with one single approach and one single tool. This time our hope will not be unwarranted.




Unit Testing in Java. How Tests Drive the Code
Unit Testing in Java: How Tests Drive the Code (The Morgan Kaufmann Series in Software Engineering and Programming)
ISBN: 1558608680
EAN: 2147483647
Year: 2003
Pages: 144
Authors: Johannes Link

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net