allankp / pytest-testrail

pytest plugin for integration with TestRail, for creating testruns and updating results
MIT License
96 stars 124 forks source link

plan_id does not work if specified in testrail.cfg #125

Closed amygitsthings closed 4 years ago

amygitsthings commented 4 years ago

Describe the bug This is basically re-opening #97

According to the --help for --tr-plan-id it says

Identifier of testplan, that appears in TestRail (config file: plan_id in TESTRUN section). If provided, option "--tr-testrun-name" will be ignored

However when I specify plan_id in the TESTRUN section of my testrail.cfg file, it is not being picked up.

To Reproduce Steps to reproduce the behavior:

  1. Create a testrail.cfg file to publish testrail results and in it, include something like:
    [TESTRUN]
    plan_id = 1556
  2. Run pytest
  3. Observe that new test runs are being created instead of using the plan_id specified in testrail.cfg
  4. If I specify --tr-plan-id in the command line args, that works though

Expected behavior Expected when I specify plan_id in my testrail.cfg file, it would publish test results to my existing test plan.