Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In the following sections we will use the word component in the broadest sense, meaning the class, module, system were are testing.

Testcase state

The definition and implementation of automatic tests go though these phazses:

  1. Specification: No code has been written, but a specification of the test has been written, eg. a description of the test has been made, or some of the test step have been described.
  2. Test-first: The test implementation is underway, but the test fails because the corresponding application functionality hasn't been implemented.
  3. Regression test: The Test and corresponding application functionality has been implemented, and the test is now part of the regression testsuite, eg. the test can be used to validate that the code isn't broken.

The test state is declared with the TestNG test group annotation: 

Code Block
@Test(groups = { ""specification-only", "testfirst", "regressiontest" })

where only one of the groups will be used in a given test state.

Clear purpose

Test should be writing directly target at investigation a specific aspect of the component we are testing. This means a test should clearly reflect a component interface feature, which can be understood by a component user. The name of the test should directly reflect the purpose of the test. Examples are:

...