Idea run/debug py.test single test not the whole suite
In your configuration, set:
- Target to the relative path of one of your test files, i.e.
testsuite/psa/test_psa_integration.py
- Keywords to a keyword that identifies the test you are trying to run specifically. If tests are part of a class, Keywords should be something like:
TestPsaIntegration and test_psa_integration_example
I don't use IntelliJ, but in PyCharm, you can easily debug tests without going through this tedious process of adding a Run/Debug configuration each time.
To do this with PyCharm, go to:
Preferences (or Settings) > Tools > Python Integrated Tools
and set Default test runner
to py.test
.
Then, back in your file (i.e. test_psa_integration.py
), you could just right-click anywhere within the code of a test, and select either Run 'py.test in ...'
or Debug 'py.test in...'
which will automatically create a new Run/Debug configuration as explained previously.