[Main Menu] [Requirements Specification] [Test Case Design] [Unit/System Test Report(STR)] [Problem Trouble Report(PTR)]

Software Test Plan

Version 1.0
5/5/96

The Network Manager Project
Csc405 -- Spring 1996

Roy K Scaife -- QA Team


Introduction

This document is a procedural guide for designing test cases and test documentation. To achieve our goal of 100% correct code, you shall perform both black box and white box testing techniques. Using these techniques will enable you to design test cases that validate the correctness of the System/Module with respect to the requirements specification. The procedure shown here shall be used in conjunction with the requirements specification. The group responsible for the module should design the test cases. Due to the ten week limit it is necessary to focus on making small steps towards a larger goal. This will allow future students to build upon our work. Thus, as the individual programs/modules complete unit testing, they are integrated to build bigger and bigger pieces.


Purpose of Software Test Plan:

  1. To achieve 100% CORRECT code. Ensure all Functional and Design Requirements are implemented as specified in the documentation.
  2. To provide a procedure for Unit and System Testing.
  3. To identify the documentation process for Unit and System Testing.
  4. To identify the test methods for Unit and System Testing.


Process of the Software Test Plan

  1. Identify the requirements to be tested. All test cases shall be derived using the current Design Specification.
  2. Identify which particular test(s) you're going to use to test each module.
  3. Review the test data and test cases to ensure that the unit has been thoroughly verified and that the test data and test cases are adequate to verify proper operation of the unit.
  4. Identify the expected results for each test.
  5. Document the test case configuration, test data, and expected results. This information shall be submitted via the on-line Test Case Design(TCD) and filed in the unit's Software Development File(SDF). A successful Peer Technical Review baselines the TCD and initiates coding.
  6. Perform the test(s).
  7. Document the test data, test cases, and test configuration used during the testing process. This information shall be submitted via the on-line Unit/System Test Report(STR) and filed in the unit's Software Development File(SDF).
  8. Successful unit testing is required before the unit is eligible for component integration/system testing.
  9. Unsuccessful testing requires a Program Trouble Report to be generated. This document shall describe the test case, the problem encountered, its possible cause, and the sequence of events that led to the problem. It shall be used as a basis for later technical analysis.
  10. Test documents and reports shall be submitted on-line. Any specifications to be reviewed, revised, or updated shall be handled immediately.
    Deliverables: Test Case Design, System/Unit Test Report, Problem Trouble Report(if any).


Test Documentation

All reports shall be completed and submitted on-line.

  • Test Case Design(TCD)

    1. The Test Case Design document shall be the complete set of test cases to be performed during testing.
    2. The Test Methods shall be implemented in the Test Case Design document.
    3. All System/Unit test cases shall receive baseline approval before coding begins.
    4. All coding shall receive baseline approval before testing begins.

  • Unit/System Test Report(STR)
    1. All Test Case Design specifications shall be applied during testing.
    2. All tests cases, unit and system, performed during testing shall be documented using the Software Test Report. These will be filed in the module's Software Development File.
    3. The Unit/System Test Report shall be used for either system and unit tests.
    4. Copies of the STR's will be sent to QA&I and the group conducting the tests.

  • Problem Trouble Report(PTR)
    1. All problems or errors found during testing shall be documented by a PTR. These reports will be filed in the module's Software Development File.
    2. The PTR shall serve as a basis for further investigation of the problem.
    3. Copies of the PTR's will be sent to QA&I and the group conducting the tests.

    Test Methods

    Testing Tools are now available. The Metre-2.3 software testing tool tests for McCabe's cyclomatic complexity and path analysis. A condensed list of command line instructions are displayed at the Testing Tools link. The Metre testing tool shall be used to gather metrics for the system and unit testing.

    System Testing

    The System Test Plan for Prototype II is the basis of systems testing for prototype II. System test case design starts after the requirements specification is baselined. The test cases generated shall directly reflect the requirements of the functional specification. The system test case designer(s) shall design appropriate test cases to validate the correctness of the system. The black box testing techniques shall primarily be used at the system test level. This technique is a comparison of the actual output with the specified output, regardless of the structure of the code or the code unit under test.

    To this end, an Equivalence Partitioning/Boundary Value technique shall be implemented. The four primary types of inputs will be:

    1. A Simple Case - A test value that establishes the basic correctness of the process. This shall be the starting point of all system and maintenance tests.
    2. Legal input values - Test values within the boundaries of the specification equivalence classes. This shall be input data the program expects and is programmed to transform into usable values.
    3. Illegal input values - Test equivalence classes outside the boundaries of the specification. This shall be input data the program may be presented, but that will not produce any meaningful output.
    4. Special Cases - Input cases that are not identified by the specification. Such as nonsensical data(i.e. negative numbers or characters), depressing several input keys at once, or any other test case the test designer feels has a good chance of exposing an error.

    The Equivalence Partitioning Technique is a test case selection technique in which the test designer examines the entire input space defined for the unit under test and seeks to find sets of input that are, or should be, processed identically. Included in the input space are legal situations that have both syntactic and semantic meaning to the program, and illegal situations that are either syntactically or semantically meaningless to it. These sets of input are equivalence classes. Similarly, in the Boundary Value techniques, the test designer first identifies the range of expected inputs(e.g. equivelence classes), then tests the input values inside and outside that range.

    For example,

      The legal input boundary is 0 to 100,
      you have three input values 5, 50, and 100, all are legal, but processed differently,
      so you have three equivelence classes within the bounded values.
      The boundary values outside the expected range are values < 0 and > 100.
      so you have two more equivelence classes outside the bounded values.
      In all you have five equivalence classes and therefore five test cases.

    After each successful installation of an approved module/program, a system test will be conducted. The system test cases shall ensure the functional/specification requirements are met. Test data/cases shall be derived from the specifications.

    Unit Testing

    Unit test case design begins after the high level design is approved by a Peer Technical Review. The unit test cases shall be designed to test the validity of the program's correctness. White box testing will be used to test the modules and procedures that support the modules. The white box testing technique ignores the function of the program under test and will focus only on its code and the structure of that code. To accomplish this, a Statement and Condition technique shall be used. Test case designers shall generate cases that not only cause each condition to take on all possible values at least once, but that cause each such condition to be executed at least once:

    1. Each decision statement in the program shall take on a true value and a false value at least once during testing.
    2. Each condition shall take on each possible outcome at least once during testing.
    3. Each program shall be tested for complexity based on McCabe's measurement.

    The Metre-2.3 software testing tool is available to find the number of paths in a program and to find its cyclomatic complexity. Metre tests both McCabe's cyclomatic complexity and Extended complexity. When the cyclomatic complexity exceeds ten, the opportunity for coding errors increases dramatically. If this situation arises, it shall be required to re-evaluate the structure of the code in question and attempt to decrease its complexity. The extended complexity metric will give you the number of paths in the code. This will assist the designer to develop test cases that encompass all possible paths.

    The measurement of cyclomatic complexity by McCabe is designed to indicate a program's testability and maintanability. It is a graph theory cyclomatic number, indicating the number of regions in a graph. As applied to software, it is the number of linearly independent paths comprising the program. As such it can be used to indicate the effort required to test a program. To determine the paths, the program procedure is represented as a strongly connected graph with a unique entry and exit point. The general formula to compute cyclomatic complexity is:

    The cyclomatic complexity metric is additive. The complexity of several graphs considered as a group is equal to the sum of the individual graphs' complexities.


    References: Software Engineering, Pressman; Software Testing Management, Royer; The Cal Poly Process, Butler