Statement: The content of this document is mainly from the book "Software Debugging the way of cultivation", Paul Butcher, belongs to the reading notes. Welcome Reprint!
-----------------------------------------------------------------------------------------------------
Automated testing
1. Effective automated Testing
- Clearly indicate whether the test results are passed
- No need to install, test or undo any changes made to the environment
- Click Run All Tests
- Full coverage, enough to resolve full coverage is possible
2. Automated testing can be used as a debugging aid
- Code that has been tested automatically is rarely flawed, easy to fix, and allows you to confidently publish software that works correctly.
- Can prevent the introduction of regression
3. Simulation testing, pile testing and other alternative testing techniques
- The pile test is passive and the simulation test is active.
- When trying to reliably reproduce a defect, it is useful to replace the test
Version management System
The source control system is the most important tool you can use in addition to the compiler!
Maintain skeleton version stability by creating a branch
The Create branch is maintained and repaired separately on the skeleton release version.
Branches often consume a lot of time and managers, so they need to be controlled and used rationally.
Static analysis
It turns out that many flaws can be discovered simply by static checking of the source code, and static analysis can be integrated into the development process to identify problems before they run.
- Make good use of the compiler
The modern compiler has a series of warning messages, such as the Keil compile will prompt a lot of warning messages, to the warning when error handling, to eliminate the warning. Using lint to discover defects in C programs
- Integrate static analysis tools with development tools
Lint can be integrated into the Keil, and there is a dedicated documentation that describes the integration approach.
< reading notes > Software debugging: Debugging from the big picture-the ideal debugging environment