Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Re-running failed and not-run tests in IntelliJ IDEA

Let me describe a simple use-case:

Running all tests in our project may take up to 10 minutes.

Sometimes I see an obvious bug in my code after the first failed test, so I want to stop running all tests, fix the bug and re-run them. Unfortunately, I can either re-run all tests from the beginning, or re-run failed tests only.

Is there a plugin for IDEA which allows me to re-run failed tests AND tests, which weren't yet executed when I pressed "STOP"?

like image 753
Olexiy Avatar asked Oct 28 '09 12:10

Olexiy


People also ask

How do I rerun failed test cases in IntelliJ?

If you want to rerun a failed test, I would suggest to first filter the test results to show only failed tests. Then you right click your test(s) you want to rerun and select Run {testMethodName} or press Ctrl + Shift + F10 .

Why is IntelliJ not running tests?

Check in Project settings -> Modules that you test package is marked as Tests. Right click on the test class name either in the code window or in the project panel, and select Run <classname>. If you don't see the run menu in the popup then you haven't selected a test or you don't have junit plugin installed.

Is JUnit can rerun the failed cases?

Rerun Failed Tests with JUnit 4 Example We need two classes, one of them is our Rule Class's RetryRule and the other is our Test Class's RetryRuleTest. In RetryRuleTest class, I will open www.swtestacademy.com and get its title and check it with the WRONG expected title.


1 Answers

Atlassian has the solution for your problem: Clover. But it is commercial.

like image 194
michael.kebe Avatar answered Dec 27 '22 13:12

michael.kebe