The best way is to have a dedicated Python file where you can add multiple test cases to execute. There are different ways to execute the test cases. 1. Execute all test cases from all the Python files in the given directory. pytest 2. Execute all the test cases from the given Python file name. pytest 3. Execute specific test cases from the given Python file. pytest ::