Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support ability to provide test plan name substring or regex instead of test plan id #127

Open
amygitsthings opened this issue Feb 28, 2020 · 0 comments

Comments

@amygitsthings
Copy link
Contributor

Is your feature request related to a problem? Please describe.
I have tests hooked into my CI/CD pipeline that will publish results to a TestRail test plan I create every milestone. The problem is that every milestone when I close the previous test plan and open a new one, I also have to update my pytest-testrail call to update to the new plan_id. My test plan names all follow the same format, something like "Milestone X Test Plan" It'd be great if I could update my testrail.cfg file to provide something like

[TESTRUN]
plan_regex = Milestone \d+ Test Plan

This would allow my config the flexibility to find the right existing test plan to publish test results to without me having to update an id every milestone.

Describe the solution you'd like
Something like if I specify

[TESTRUN]
plan_regex = Milestone \d+ Test Plan

My test results will be published to the first open testplan with a name that matches the plan_regex.

Describe alternatives you've considered
I thought about creating a testrail.cfg generator that will first look up the id of the test plan I want and then generate the testrail.cfg file to feed into my pytest call, but I feel like that is overkill and it'd be much better if pytest-testrail supported this ability directly.

Additional context
I'll create a pull request shortly with my proposed new config.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant