Forms of Automated Testing
Explore the various forms of automated testing used in Python, focusing on unit tests for small code units, integration tests for multiple components, and acceptance tests that simulate user scenarios. Understand when and how to apply each testing form to achieve effective, scalable testing practices and maintain code quality in complex projects.
We'll cover the following...
Unit tests are intended to verify very small units of code, for example, a function, or a method. We want our unit tests to reach a very detailed level of granularity, testing as much code as possible. To test something bigger, such as a class, we would not want to use just unit tests, but rather a test suite, which is a collection of unit tests. Each one of them will be testing something more specific, like a method of that class.
Unit tests aren't the only available mechanism of automatic testing, and we shouldn't expect them to catch all possible errors. There are also integration and acceptance tests, both of which are beyond the scope of this course.