Writing and Maintaining Unit Tests
The task of software engineering can be interpreted as the ability to deliver quality products that contribute to the business value of customers. In this age of technology, customers have high standards and demand excellence.
The notion of quality has been interpreted in different ways over the years. However, here are two key aspects:
- That it must meet the user requirements
- It must be free of defects
These two requirements are captured by verification and validation processes, which assert that the software achieves the intended goal without any defects. There are many software engineering techniques that aim to achieve these goals, including code reviews, pair programming, and so on, but the most common is testing. Although there are many books that focus on the art and practice of software testing, this chapter focuses on unit testing, which is the most widely used approach. Test-driven development (TDD) is a popular...