pytest-testrail icon indicating copy to clipboard operation
pytest-testrail copied to clipboard

Annotate tests with associated test suite

Open davebrochu-es opened this issue 4 years ago • 1 comments

Is your feature request related to a problem? Please describe. Many teams use multiple test suites in TestRail for given projects. In an automated test project, it is possible that one directory or file contains tests that belong to one suite while another directory or file contains tests that belong to a different suite. If a regression tests is run where ALL automated tests are run, it isn't possible using this plugin to upload test result. This is due to a limitation where the user must specify from the command line/config the suite-id that ALL tests being run are associated with.

The only way around this is to run different suites independently using pytest, each time supplying the suite-id that is relevant for the tests selected.

Describe the solution you'd like Similar to the @pytestrail.case and @pytestrail.defect decorators, a decorator to specify the suite a test belongs to would be useful. @pytestrail.suite_id.

davebrochu-es avatar Dec 07 '20 01:12 davebrochu-es

Looking at the TestRail API, add_run requires a suite_id, which is likely where this requirement in the pytestrail plugin originates from. In order to support this, the plugin would need to create multiple test runs, given that each requires its own suite_id.

davebrochu-es avatar Dec 07 '20 02:12 davebrochu-es