Summary
In this chapter, we introduced different levels of testing for software applications. We also evaluated two test frameworks (unittest
and pytest
) that are available for Python test automation. We learned how to build basic- and advanced-level test cases using these two frameworks. Later in the chapter, we introduced the TDD approach and its clear benefits for software development. Finally, we touched base on the topic of CI, which is a key step in delivering software using agile and development-operations (devops) models.
This chapter is useful for anyone who wants to start writing unit tests for their Python application. The code examples provided provide a good starting point for us to write test cases using any test framework.
In the next chapter, we will explore different tricks and tips for developing applications in Python.