kondratyev-nv / vscode-python-test-adapter

Python Test Adapter for the VS Code Test Explorer

Home Page:https://marketplace.visualstudio.com/items?itemName=LittleFoxTeam.vscode-python-test-adapter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

KrupalJoshi opened this issue · comments

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"
   ]

@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).