When debugging, testing, and troubleshooting, code is often rewritten to change how it works, a process that is also known as refactoring. The benefit of having test cases available means that changes to the code can be checked to see whether functionality has been compromised, such as interactions between functions or methods or if end-user complications have developed.
In large testing projects, continuous integration test suites are utilized to check code as the developers upload it to the server. These tests not only check each developer's code, but also check it against other code that was submitted to ensure that the entire project continues to function properly.
Refactoring can take many different forms, such as the following:
- Adding comments to help clarify key bits of code or why a certain piece of logic was used.
- Improving readability by separating...