Huawei software programming specification Learning (11)-code testing and maintenance
11-1: The unit test requires at least statement overwrite.
11-2: at the beginning of the unit test, we need to track each statement and observe the changes of data streams and variables.
11-3: cleaned, sorted, or Optimized Code should be reviewed and tested
11-4: code version upgrades must be strictly tested
11-5: Use the tool software to maintain the code version
11-6: any modifications to the software on the official version should be documented in detail
Others
11-1: Modify an error immediately and record it.
11-2: key code tracking at the Assembly level
11-3: carefully design and analyze test cases to cover as many cases as possible to improve the efficiency of Test Cases
11-4: Simulate various program errors as much as possible, and fully test the error handling code
11-5: carefully test the code processing data and variable Boundary
11-6: retain test information for analysis, experience summarization, and more adequate testing
11-7: we should not try to solve the problem. We should look for the root cause of the problem.
11-8: Analyze automatically disappearing errors to find out how the errors disappear.
11-9: modifying an error not only causes the table but also causes the problem.
11-10: Try to make few incidents happen frequently during testing
11-11: Identify the events that a module or function processes and make them happen frequently.
11-12: perform a thorough unit test on the code at the encoding stage. Do not wait for future testing to discover problems.
11-13: Remove random code running (such as removing useless data, code, and avoiding and paying attention to the "internal register" in the function as much as possible) to make the function running result predictable, and make the error reproducible