Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

like image 631
Michael Neale Avatar asked Nov 26 '08 23:11

Michael Neale


People also ask

How do I run test cases with coverage in intelliJ?

From the main menu, select Run | Show Coverage Data ( Ctrl+Alt+F6 ). In the Choose Coverage Suite to Display dialog, select the checkboxes next to the necessary suites, and click Show selected. IntelliJ IDEA opens the coverage results for the selected test suites.

What is run with coverage intelliJ?

Coverage in the Coverage tool window If you want to reopen the Coverage tool window, select Run | Show Code Coverage Data from the main menu, or press Ctrl+Alt+F6 . The report shows the percentage of the code that has been executed or covered by tests. You can see the coverage result for classes, methods, and lines.


2 Answers

  1. Run->Edit Configurations...
  2. Create a new junit test configuration
  3. Name it "All tests"
  4. Include entire package
  5. Apply/Run.

enter image description here

From @andersoyvind's comment.

like image 159
csauve Avatar answered Oct 05 '22 23:10

csauve


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

like image 22
digitalsanctum Avatar answered Oct 06 '22 00:10

digitalsanctum