bannerc

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin
Tabsetup
01. The Requirement
12. Rationale
23. Guidance
34. Small Projects
45. Resources
56. Lessons Learned
67. Software Assurance
Div
idtabs-1

1. Requirements

Excerpt

4.4.6 The project manager shall assure that the unit test results are repeatable. 

1.1 Notes

NPR 7150.2, NASA Software Engineering Requirements, does not include any notes for this requirement.

1.2 History

Expand
titleClick here to view the history of this requirement: SWE-186 History

Include Page
SITE:SWE-186 History
SITE:SWE-186 History

1.3 Applicability Across Classes

 

Applicable c
a1
b1
csc1
c1
d1
dsc1
e0
f1
g0
h0

Div
idtabs-2

2. Rationale

Unit test procedures are to be repeatable so that future runs can confirm that any identified flaws have been corrected and for regression purposes to ensure that any new changes do not introduce new flaws in the software. As stated in SWE-062, unit testing can be described as the confirmation that the unit performs the capability assigned to it, correctly interfaces with other units and data, and represents a faithful implementation of the unit design.  

Div
idtabs-3

3. Guidance

Unit tests are performed per SWE-062. Unit test results should follow test procedures and be repeatable.

IEEE STD 610.12-1990, IEEE Standard Glossary of Software Engineering Terminology, a "unit" is defined as:

(1) A separately testable element specified in the design of a computer software component. 
(2) A logically separable part of a computer program.
(3) A software component that is not subdivided into other components.
 
Given the low-level nature of a unit of code, the person most able to fully test that unit is the developer who created it.  

Projects ensure that the appropriate test environment, test materials, and personnel training (SWE-017), are in place and then conduct unit tests per the approved plans (Software Test Plan), according to the schedule (SWE-016), and with proper monitoring per the software assurance plan, making sure that:

  • Criteria for a successful test are established before the test.
  • The test environment represents inputs, output, and stimulus the unit will experience in operation.
  • Capture weaknesses or differences between the unit test environment and the actual target environment.
  • Following the approved plans for unit testing:
    • Unit test results are captured.
    • Issues are identified and documented (some minor issues, such as typos, as defined by the project, may simply be corrected without documentation).
    • Unit test issues are corrected; these may include:
      • Issues found in the code.
      • Issues found in test instruments (e.g., scripts, data, procedures).
      • Issues found in testing tools (e.g., setup, configuration).
    • Unit test corrections are captured (for root cause analysis, as well as proof that the unit test plans were followed).
  • Unit test results are evaluated by someone other than the tester to confirm the results, as applicable and practical; evaluation results captured.
  • Unit test data, scripts, test cases, procedures, test drivers, test stubs are captured for reference and any required regression testing.
  • Notes captured in software engineering notebooks or other documents are captured for reference.
  • Objective evidence that unit tests were completed and unit test objectives met is captured in the Software Development Folders (SDFs) or other appropriate project location as called out in the project documentation (e.g., Software Development Plan (SDP)/ Software Management Plan (SMP), Configuration Management (CM)Plan).
  • Unit test metrics captured, as appropriate and defined for the project.

Per NASA-GB-8719.13

Swerefn
refnum276
, NASA Software Safety Guidebook, software assurance is to "Verify unit testing and data verification is completed before the unit is integrated."

Documented test results, results evaluations, issues, problem reports, corrections, and tester notes can all serve as evidence that unit tests were completed. Comparing those documents to the software test plans for unit testing can ensure the tests were completed following those documented procedures. Make sure evidence of all test passes is captured.

Once unit tests are completed and results are documented, the tests should be repeated to ensure the same results.

Additional guidance related to unit testing may be found in the following related requirements in this handbook:

Div
idtabs-4

4. Small Projects

No additional guidance is available for small projects.

Div
idtabs-5

5. Resources

5.1 References

refstable
Show If
groupconfluence-users
Panel
titleColorred
titleVisible to editors only

Enter the necessary modifications to be made in the table below:

SWEREFs to be addedSWEREFS to be deleted
added SWEREF-013
added SWEREF-271
added SWEREF-276

SWEREFs called out in the text: 276

SWEREFs NOT called out in text but listed as germane: 013, 271,


5.2 Tools

Include Page
Tools Table Statement
Tools Table Statement

Div
idtabs-6

6. Lessons Learned

6.1 NASA Lessons Learned

No Lessons Learned have currently been identified for this requirement.

6.2 Other Lessons Learned

No other Lessons Learned have currently been identified for this requirement.

Div
idtabs-7

7. Software Assurance

Excerpt Include
SWE-186 - Unit Test Repeatability
SWE-186 - Unit Test Repeatability

7.1 Tasking for Software Assurance

  1. Confirm that the project maintains the procedures, scripts, results, and data needed to repeat the unit testing (e.g., as-run scripts, test procedures, results).

7.2 Software Assurance Products

  • None at this time.


    Note
    titleObjective Evidence
    • Unit test results.
    • Software problem or defect report findings related to issues identified in unit testing.
    • Configuration data for unit testing.
    Expand
    titleDefinition of objective evidence

    Include Page
    SITE:Definition of Objective Evidence
    SITE:Definition of Objective Evidence

7.3 Metrics

  • # of planned unit test cases vs. # of actual unit test cases successfully completed
  • # of Safety-Critical tests executed vs. # of Safety-Critical tests witnessed by SA

7.4 Guidance

Software assurance will assure that unit test results are repeatable. To do this, they will check that the following are recorded and stored:

  • The tests and test procedures, test cases as run
  • Any input data for the tests, including any databases or other data needed for the test, outputs,
  • Capture any stimulus the unit will experience in the operation
  • Build instructions
  • Scripts or test drivers and test stubs used with the test
  • Test configurations (versions of operating systems, tools used, etc.). Capture any differences between the unit test environment and the planned operational environment
  • The version of the software being tested
  • Test report and a record of any discrepancies found in the unit

...