Task: Run Developer Tests
Run tests against the individual software components to verify that their internal structure works as specified.
Discipline:  Implementation
Purpose
The purpose of this task is to verify that the implementation works as specified.
Relationships
RolesPrimary Performer: Additional Performers:
InputsMandatory: Optional:
  • None
Outputs
Main Description

Implementation and modification of components takes place in the context of configuration management on the project. Developers are provided with a private development workspace in which they do their work (see Concept: Workspace). In this workspace, source elements are created and placed under configuration management, or they are modified through the usual check out, edit, build, unit test, and check in cycle.

Following the completion of some set of components required for an upcoming build, the developer will deliver the associated new and modified components to the component integration workspace, for integration with the work of other developers. Finally, at a convenient point, the developer can update, or re-baseline, the private development workspace so it's consistent with the component integration workspace.

Steps
Run tests

Make sure you have the test environment set up with all needed elements, such as software, hardware, tools, data and so on. Refer to Task: Implement Developer Tests for more information.  Then, initialize the test environment to ensure all components are in the correct initial state for the start of testing.

Execute the tests. The execution will vary depending on wheter test is manual or automated, and whether test components are needed as either drivers or stubs.

Evaluate execution of tests

Determine whether the tests completed successfully and as desired, and if corrective action is required. The execution of testing ends or terminates in one of two conditions:

  • Normal: all test procedures (or scripts) execute as intended. If testing terminates normally, then continue with the step Verify tests results.
  • Abnormal or premature: the test procedures, or scripts, did not execute completely or as intended. When testing ends abnormally, the test results may be unreliable. The cause of termination must be identified, corrected, and the tests re-executed before additional test tasks are performed.
Verify tests results

Review the test results to ensure they are reliable and reported failures, warnings, or unexpected results were not caused by external influences (to the target-of-test), such as improper setup or data.

If the reported failures are due to errors identified in the test work products or due to problems with the test environment, take the appropriate corrective action as described in step Recover from halted tests, and then execute the tests again.

If the test results indicate the failures are genuinely due to the target-of-test, then this task is complete and the Task: Request Change should typically be performed.

Recover from halted tests

Determine the appropriate corrective action to recover from a halted test, and execute the tests again. 

There are two major types of halted tests:

  • Fatal errors; for example, network failures, hardware crashes, and the like.
  • Test Script Command Failures; specific to automated testing, this is when a test script cannot execute a command or a line of code.

Both types of abnormal termination to testing may exhibit the same symptoms:

  • Unexpected actions, windows, or events occur while the test script is executing.
  • Test environment appears unresponsive or in an undesirable state, such as hung or crashed.

To recover from halted tests, perform these steps:

  1. Determine the actual cause of the problem.
  2. Correct the problem.
  3. Set up the test environment again.
  4. Initialize the test environment again.
  5. Execute the tests again.
Key Considerations

It is common to require that code pass all developer tests before it can be delivered in an integrated build (see Guideline: Promoting Builds).

Unit means not only a class in an object-oriented language, but also free subprograms, such as functions in C++. For testing each unit (implemented class), perform the steps defined for this task.

More Information