Run multiple test using PyTest and module names

Answered

Hello,

I'm trying to run two tests withing a script through module names rather than through other means. I have tested writing the following under Run > Configurations > Target > Module name:

script.test_one script.test_two

When I run only one module it works, but I cannot run two. My main goal is to run two specific tests instead of all test within a PyTest script. Can this be done? 

Thank you!

2 comments
Comment actions Permalink

Hi,

You can either right-click the directory with your tests and choose Run 'pytest in... and PyCharm will create a run configuration automatically, or create a Compound run configuration which will run a set of needed run configurations.

1

Please sign in to leave a comment.