I have a Kotlin project and when I run my JUnit tests, I can't see tests execution result in IntelliJ and get this message instead:
test events were not received
I'm using this setup:
macOS Mojave Intellij CE 2019.2 JDK 11.0.3 Kotlin 1.3.50 Gradle 5.2.1 JUnit 4.12
Can you help me?
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.
In your production code in the editor, place the caret at the class for which you want to create a test, press Alt+Enter , and select Create Test. In the Create Test dialog, select the library that you want to use. If you don't have the necessary library yet, you will be prompted to download it. To do that, click Fix.
on the Test Runner toolbar. If you haven't run any tests yet, and the tool window with the Test Runner toolbar is not available, press Ctrl+Shift+A and type Import Tests from File . In the dialog that opens, select the . xml file with test results and click Open.
For me, the Same issue was occurring, below changes worked for me. IntelliJ Version I am using: 2019.2.2
In IntelliJ IDE, Go to
File -> Settings ->Build,Execution, Deployment -> Build Tools -> Gradle
here in the Run test using:
dropdown selected option was: Gradle(default)
changed it to IntelliJ IDEA
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With