Debugging and testing take an extremely important role in the pipeline of the software development process. Testing helps us to find problems while debugging fixes them. However, if we follow certain rules during the implementation stage, lots of potential defects can be prevented. Additionally, since a test process is very costly, it would be great if we could automatically analyze software by using certain tools before human testing is required. Moreover, when, how, and what we should test regarding software is also important.
In this chapter, we will cover the following topics:
- Understanding the root cause of an issue
- Debugging C++ programs
- Understanding static and dynamic analysis
- Exploring unit testing, TDD, and BDD
Throughout this chapter, we will learn how to analyze a software defect, how to use a GNU Debugger (GDB) tool to debug a program, and...