How do I make IntelliJ IDEA run all the tests in a package including sub packages
Intellij IdeaIntellij Idea Problem Overview
If I click on a package and do control-shift-F10 it only looks for and runs JUnit tests in that package - but I really want it to recurse down into subpackages and run them.
UPDATE: looks like its something else wrong. When I run it on a package that has tests, it still complains there are none (yet if I open a JUnit test I can run it just fine).
Intellij Idea Solutions
Solution 1 - Intellij Idea
- Run->Edit Configurations...
- Create a new junit test configuration
- Name it "All tests"
- Include entire package
- Apply/Run.
From @andersoyvind's comment.
Solution 2 - Intellij Idea
The default key combination to run all tests is Ctrl+Shift+F10
Solution 3 - Intellij Idea
I've solved this thanks to csauve response. This could be an answer to his, but I didn't know how to include an image there.
Run/Debug Configurations dialog box can be access via Run > Edit Configurations. Use these options to create one that runs all your tests:
Solution 4 - Intellij Idea
For Python users:
- Include
__init__.py
in each subfolder - Create a
dummy_test.py
in the root of your tests directory, eg.:
class DummyTest(TestCase):
pass