[IntelliJ Tips] JUnit trouble shooting.

Coder
1 min readDec 21, 2020

I recently migrated my development environment from Mac to Windows.

After installing Windows version of IntelliJ IDEA 2020, I imported my project from bitbucket and ran a test.

All of a sudden, the test failed with a message saying “Test events were not received”.

I resolved this issue with the following step.

  1. Remove two directories called “.idea” and “.gradle” in the project root directory.
  2. Reopen the project and open the IntelliJ Setting (File -> Settings).
  3. Go to the Gradle setting (Build, Execution, Development -> Build Tools -> Gradle), and change “Run tests using: Gradle” to “Run tests using: IntelliJ IDEA”. By default, it’s gradle.
  4. Add the following line to the “.idea/workspace.xml” file.
    You should add this under the component named PropertiesComponent.
<component name=PropertiesComponent">
<property name=”dynamic.classpath” value=”true” />
<property name=.../>
...
</component>

Above modification will resolve the too long command line issue.

Done. Run the tests and see if it works!

--

--