Child pages
  • Test strategy
Skip to end of metadata
Go to start of metadata

Description of our test strategy and how this is implemented

Test driven development

We used the principles from Test-Driven Development (TDD) during implementation. This means our implementation workprocess should strive to follow this work sequence:

  1. Describe/specify a bit of functionality.
  2. Define a test to examine the implementation state of the functionality. This test will of course fail initially because the functionality hasn't been implemented yet. 
  3. Implement the functionality until is passes the previously defined test.

This sequence should be repeat until all the parts of a given functionality has been implemented. It is important to run through the sequence on as small parts of the functionality at a time, to maximize the synergy between the different development aspects (describe/test/implement). Steps 2-3 and may be repeated seperatly a number of times, before needing to go back to step 1 to descibe the next bit of functionality.

Concrete examples are:

Unit test

Here we will be testing a single class, typically by adding or extending a method. The concrete sequence here would be:

  1. Add the Javadoc for the next bit of functionality.
  2. Create of extend a unit test to examine the current implementation state of the functionality. Only write enough unit test to hit the first failing line of unit test.
  3. Write enough code to make the unit test pass.
  4. Repeat step 2 and 3 until the functionality specified in step one is covered

System test

Here we will be working on adding functionality to the full system. The concrete sequence here would be: 

  1. Create the specification describing the functionality. The specification should be detailed enough to contain acceptance criterias which can be tested.
  2. Write the test specification
  3. Create of extend a system/integration test examine the current implementation state of the functionality. Only write enough test to hit the first failing line of test.
  4. Write enough code to make the test pass.
  5. Repeat step 2 and 3 until the functionality specified in step one is covered

Automatic test

We aim to automate as much of the test as possible. This also means creating and maintaining a suite of integration and system acceptance tests.

We use the TestNG framework for our automatic testing.

See Writing automatic tests for guide lines on how to write automatic tests

Test specification

We have yet not decide how we document our test. A proposal for a solution can be found here: Using JAccept for TestNG acceptance testing.

  • No labels