Idea 2017.1 Will Not Run Junits except as Debug or Code Coverage
1) I have Junit-4.12 and hamcrest-core-1.3 jars added as libraries to my Project Structure.
2) test directory and all sub directories are configured as Test Source directories (they appear in green in the Project window).
3) Right clicking on any of the test directories offers "Run 'Tests in xxx', 'Debug 'Tests in xxx', 'Run 'Tests in xxx with 'Coverage'. The last two options work fine. The first option does nothing. No errors. No progress messages. No output. Nothing.
The run configuration for my test has
Test kind: Class Fork mode: none Repeat: once
VM options: -ea
Working directory: $MODULE_DIR$
Use classpath of module: my module
JRE: Default (1.8)
Before launch: Build
Why do the Debug and Coverage options work but plain Run does not work on this JUnit?
Thanks!
Please sign in to leave a comment.
Please file a bug at https://youtrack.jetbrains.com/issues/IDEA and provide a reproducible test case (sample project).
I discovered that after restarting Idea, the problem goes away. However, this has happened a number of times. Apparently, Idea gets itself in a state when the JUnit "Run Tests" commands - all of them - do nothing, while the Debugging/Coverage commands do run the Junit test.
Deleting and recreating the run configuration makes no difference. Nor does attempting to run the tests from the Run menu. Same behavior.
However, restarting Idea fixes the problem - for a while.
Any ideas?
In addition to the sample project please also zip and attach your logs folder (https://intellij-support.jetbrains.com/hc/articles/207241085) to YouTrack issue.