Basic
General
Reporting
The -r option accepts a number of characters after it. Default is fE to list failures and errors. f - failed E - error s - skipped x - xfailed X - xpassed p - passed P - passed with output Special characters for (de)selection of groups: a - all except pP A - all N - none, this can be used to display nothing (since fE is the default) |
Debugging
Parallelization [pytest-xdist]
Distributing algorithm values are no: --numprocesses will send pending tests to any worker that is available, without any guaranteed order. loadscope: Tests are grouped by the module for test functions and by class for test methods. loadfile: Tests are grouped by their containing file. Testrail [pytest-testrail]
pytest --testrail --tr-config= testrail.cfg Testrail config file template: [API] url = https://yoururl.testrail.net/ email = user@email.com password = <api_key> [TESTRUN] assignedto_id = <user-id> project_id = <project-id> suite_id = <test-suite-id> name = <test-run-name> |
Cheatography
https://cheatography.com
Pytest Cheat Sheet by nanditha
Pytest is one of the best tools used to boost software testing productivity.
Created By
Metadata
Comments
No comments yet. Add yours below!
Add a Comment
Related Cheat Sheets