Just been playing around for the first time with IntelliJ IDEA Community edition, first time I have worked with it so if I'm missing something, please excuse me.
I have a bunch of unit tests which I run, however, when running them in IntelliJ (with the standard setup out of the box), I intermittently get the following error in the console:
03:14:17 Failed to start: 58 passed, 1 not started
I have searched the web but to no avail. If I run just the test that failed, it may or may not print out a similar error:
03:19:54 Failed to start: 0 passed, 1 not started
If I keep trying, eventually it works and tells me that all of my tests have passed.
The image is not the error as an exclamation mark, it is a different error icon (), which I do not recognise. The error in Event Log window appears as red text.
It always appears to happen with only one test and it is always the same test for any given set of tests. I.E. In a different project, the same issue also appears, but for a different test (but its always the same one in each project or set of tests).
One more thing to note is that this ONLY happens when debugging and not when running, so it may be something to do with connecting the debugger?
It all works perfectly fine with Eclipse.
Any ideas what could be causing this?
Many thanks!
Looks like this may have been a bug on IntelliJ, it has been raised with them.
I've created a ticket for IntelliJ IDEA, you can vote for it if you still encounter this problem.
I had this problem (in Android Studio but its a customised IntelliJ) and the reason was WHERE the cursor was when I ran tests using CTRL-SHIFT-F10.
Once I moved the cursor into a test method or not inside any method, it worked.
I had the same issue that cracked me up a little in IntelliJ IDEA 2017.2.1. The test case ran without any recognizable errors or irregularities, but in the end JUnit claimed the case as not started.
Figured out it was caused by trying to print into a PrintWriter that has already been closed.
I had the same issue. Whatever be the number of
scenarios
, it was showing 1 extrascenario
inNOT STARTED
stage. I was using Scenario Outline to run tests and had commented the rows in theExample tables
.I later found out that commenting the whole example table (which I didn't wanted to run) resolved the issue rather than commenting each row.
I got the same error. It was something weird sent to System.out that made IntellJ IDEA test "not started".