Migration of unmigrated content due to installation of a new plugin
1. The Requirement
4. Small Projects
6. Lessons Learned
7. Software Assurance
4.4.6 The project manager shall assure that the unit test results are repeatable.
NPR 7150.2, NASA Software Engineering Requirements, does not include any notes for this requirement.
Click here to view the history of this requirement: SWE-186 History
1.3 Applicability Across Classes
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.
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.
, 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: