How do I make IntelliJ IDEA run all the tests in a package including sub packages

Viewed 50201

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

4 Answers

The default key combination to run all tests is Ctrl+Shift+F10

For Python users:

  1. Include __init__.py in each subfolder
  2. Create a dummy_test.py in the root of your tests directory, eg.:
class DummyTest(TestCase): 
    pass

(credit to this answer)

Related