How do I run multiple test classes at once?

已回答

When I select multiple test classes in the project pane and then run the context configuration, only the first class is run. Is this a bug?

3

Hello Peter,

When I select multiple test classes in the project pane and then run
the context configuration, only the first class is run. Is this a bug?


No. There is no feature in IntelliJ IDEA for running multiple individually
selected test classes in one session.

--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


-1
Avatar
Permanently deleted user

I think this should be added. It's the natural expectation. Other actions like refactorings and compilation also operate on all selected files.

1

1. Put the classes under same folder

2. Right click the folder

3. Pick the option "Run Tests in Your.Folder.Path"

It runs test in multiple classes.

1

Thx Powercoders35, works like a charm. 

WIBNI we could run these packet tests with coverage as well? 
But how? IMHO this would make sense as a lot of development tasks are focused on specific packages (both new and existing).

Ok, I found a way, but it's less agile than right-clicking on a package:

  1. First create a new JUnit run configuration (Run, Edit  Configurations… from the main menu) for a specific package (or any other group / filter condition).
  2. Then call Run <your configuration created above> with Coverage from the main menu.
0

请先登录再写评论。