kondratyev-nv / vscode-python-test-adapter

Python Test Adapter for the VS Code Test Explorer
https://marketplace.visualstudio.com/items?itemName=LittleFoxTeam.vscode-python-test-adapter
MIT License
117 stars 27 forks source link

Python test explorer not accepting '--testrail' as an pytest argument #267

Open KrupalJoshi opened 2 years ago

KrupalJoshi commented 2 years ago

Test discovery fails if user supply '--testrail' argument in pytest argument section inside setting.json file.

e.g.:

"python.testing.pytestArgs": [
        "D:\\tests",
        "--testrail",
        "--tr-run-id=1234",
        "--tr-config=D:\\input.cfg"
    ]
kondratyev-nv commented 2 years ago

@KrupalJoshi I'm not familiar with TestRail framework and it seems to be paid, so I can't verify that it's compatible with the extension. Can you please provide additional details, like what exact error you're seeing? Is it possible to reproduce somehow without buying it? If I just add it without installing it, I see the following error

Test loading failed: Error: Process exited with code 4: ERROR: usage: __main__.py [options] [file_or_dir] [file_or_dir] [...]
__main__.py: error: unrecognized arguments: --testrail
  inifile: /<path>/vscode-python-test-adapter/test/test_samples/pytest/pytest.ini
  rootdir: /<path>/vscode-python-test-adapter/test/test_samples/pytest

Which is reasonable as pytest is not aware of this option (same from running from command line).