Basically, a distinction is made between static and dynamic test procedures.

Static test procedures

are used to check the source code, but it’s not executed. They are divided into

Dynamic testing

are used to find errors when executing the source code. A distinction is made between whitebox and backbox tests.

Whitebox tests

are developed with knowledge of the source code and the software structure. In Python, various modules are available:


supports you in automating tests.


allows you to create and use mock objects.


allows you to test tests written in Python docstrings.


allows you to test in different environments.

Blackbox tests

are developed without knowledge of the source code. In addition to Unittest, Hypothesis can also be used in Python for such tests.