Summary
In this chapter, we took a look at how testing forms an important aspect of the application development project and why it is necessary. Here, we took a look at the different types of testing that are usually employed during the development life cycle and what the uses of different techniques are. We then moved on to taking a look at how we can craft our code in a way that makes testing an easy and effective process. Moving on, we started digging deeper into the Python language to see what facilities it provides for writing up tests. Here, we discovered how to use the Python unittest
library to write unit tests, and how to run them. Moving on, we took a look at how we can utilize testing frameworks like pytest
to write test cases for our demo application, Bugzot, and how to run these test cases. Once familiar with the art of writing test cases, we tried to understand why we need to automate the running of test cases and how we can achieve that.
With the knowledge of testing the code...