-
Notifications
You must be signed in to change notification settings - Fork 567
Trilinos Testing Policy
Test writing is an essential software development activity. Without adequate, independent and easily executed tests, software viability is at risk of breaking due changes in upstream dependencies, build environments, internal refactorings and enhancements. Under-tested software is unsustainable.
- All functionality will be covered by testing: Numerous approaches are possible. Chapter 22 of Steve McConnell's book Code Complete is an excellent resource. Structured Basis Testing (having as many tests as there are logic paths through your code) is a good starting point. Formal unit testing is even better.
- Untested functionality is itself a bug: If any user or developer identifies an untested code segment in a Production Growth package, there is a right and obligation to report it.
- Contributed code must be covered: While we appreciate non-developer contributions, they are subject to the same code coverage requirements. In particular, Trilinos developers may refuse to accept contributions that do not have tests.
- Policy Scope: This policy formally applies to any Production Growth package development. It is encouraged for packages in other phases (Research Stable or Production Maintenance).
- Exceptions: Yes, there will be exceptional circumstances where you need to commit some functionality without a corresponding test, but it should be the exception and addressed as soon as possible. If you must commit code without testing coverage, file an issue. Issues with management, user or client support for taking time to write tests should be forward to the Trilinos project leader.
- Test writing is part of your day job: Time spent writing tests is a core job responsibility, justifiable as a normal part of your work day.
- Design for testability: Without careful design, state variations can be so complicated that it becomes impossible to confidently test all, or even the most important software capabilities.
-
The src-test diagnostic: A quick check for testing compliance: While not sufficient, one simple diagnostic for testing compliance is checking whether or not a commit log message lists changes to both
src
andtest
directories.
Contact Mike Heroux [email protected]
Code Complete, 2nd Edition, by Steve McConnell
Copyright © Trilinos a Series of LF Projects, LLC
For web site terms of use, trademark policy and other project policies please see https://lfprojects.org.
Trilinos Developer Home
Trilinos Package Owners
Policies
New Developers
Trilinos PR/CR
Productivity++
Support Policy
Test Dashboard Policy
Testing Policy
Managing Issues
New Issue Quick Ref
Handling Stale Issues and Pull Requests
Release Notes
Software Quality Plan
Proposing a New Package
Guidance on Copyrights and Licenses
Tools
CMake
Doxygen
git
GitHub Notifications
Mail lists
Clang-format
Version Control
Initial git setup
'feature'/'develop'/'master' (cheatsheet)
Simple centralized workflow
Building
SEMS Dev Env
Mac OS X
ATDM Platforms
Containers
Development Tips
Automated Workflows
Testing
Test Harness
Pull Request Testing
Submitting a Pull Request
Pull Request Workflow
Reproducing PR Errors
Addressing Test Failures
Trilinos Status Table Archive
Pre-push (Checkin) Testing
Remote pull/test/push
PR Creation & Approval Guidelines for Tpetra, Ifpack2, and MueLu Developers