Run JUnit test from within class test (NOT GRADLE)
Answered
I used to run test classes/ test methods as JUnit from the class (hitting run button next to class name / method name). IDEA was creating automatically configuration for test and run it.
I Updated to latest version of IDEA 2019 (previously used 2018).
Now I have to do JUnit run configuration manually because it runs as gradle tasks.
How Can I change to previous behavior?
Please sign in to leave a comment.
As a general troubleshooting step, please re-import the project after removing the `.idea` directory.
If it does not help, please share a sample project where the issue could be reproduced.
I can't simply remove .idea folder, since it contains all my preferences.
This is how I solved it. Thanks, for nothing
For those unable to find the config mentioned by Andrei Amarfii, it's located in:
Settings | Build, Execution, Deployment | Build Tools | Gradle | Build and run
Option
Run test using : IntelliJ IDEA
doesn't seem to work any longer in IDEA 2021.3.2, Kotlin MPP (jvmTest).
In a Java project with a Junit test class I'm still able to see the “Junit” run tests options and they work in IDEA / IntelliJ 2024.1.2
Build #IU-241.17011.79, built on May 21, 2024
I have the JUnit plugin enabled too.