davidjnevin / ddd_critiquewheel

Migration of Critique Wheel: a web app for the free exchange of critiques for writers of short fiction.
https://www.critiquewheel.com
1 stars 0 forks source link

Implement MakeFile command for parallel testing #110

Closed davidjnevin closed 11 months ago

davidjnevin commented 11 months ago

pip install pytest-xdist pytest -n 4

Notes:

Test Independence: Ensure that your tests are independent of each other. Tests running in parallel should not share any state or rely on a specific order of execution.

Resource Utilization: Running tests in parallel can be resource-intensive. The optimal number of cores to use depends on your system's resources and the nature of your tests.

Database Access: If your tests interact with a database, make sure to configure your database for concurrent access or use separate database instances for each test thread to avoid conflicts.

Logging and Output: Parallel test execution can result in interleaved output logs. pytest-xdist offers options to manage and control log output.

Compatibility: Some pytest plugins or custom fixtures may not be compatible with parallel execution.