Unit tests are a key component of software engineering, and the Extreme Programming discipline, for instance, leverages them to permit easy code changes. Being of such importance, many companies now provide tools, frameworks, and services around unit tests. Tools range from specialized test frameworks, as for example integrated in Visual Studio Team System (VSUnit), to automatic unit-test generation, e.g. as provided by Parasoft Jtest and Agitar AgitarOne. However, these tools do not provide any guidance for:
- which tests should be written (for internal and for external behavior),
- how to come up with a minimal number of test cases and
- what guarantees the test cases provide.
Parameterized unit testing is a new methodology extending the current industry practice of closed unit tests (i.e., test methods without input parameters). Test methods are generalized by allowing parameters. This generalization serves two purposes.
- First, parameterized test methods are specifications of the behavior of the methods-under-test: they do not only provide exemplary arguments to the methods-under-test, but ranges of such arguments.
- Second, parameterized unit tests describe a set of traditional unit tests which can be obtained by instantiating the parameterized test methods with given argument sets. Instantiations should be chosen so that they exercise different code paths of the methods under test.
Admittedly, writing open, parameterized unit tests is more challenging than writing closed, traditional unit tests. This tutorial serves as a starting point for familiarizing the attendees with principles, techniques, and applications of parameterized unit testing. This tutorial will greatly benefit from the increasingly importance and popularity of the developer testing field and will help increase awareness of this important and promising field. The attendees will gain the skills and knowledge needed to conduct research and/or practice on developer testing, especially in the form of parameterized unit testing.
In particular, the following skills and knowledge of conducting developer testing will be gained by the attendees and teaching these skills and knowledge will be gained by attendees with educational interests.
- Write parameterized unit tests.
- Write mock objects.
- Analyze results.
- Interact with tools to give guidance to tools.
- Understand how dynamic symbolic execution can be used to test software.
- Understand the limitations of the approach.
- Understand and use test generation tools.
In addition, the attendees will also gain skills and knowledge of developing new research techniques and tools in the area of developer testing.