Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Test events were not received" when run tests using Intellij

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?

like image 864
Héctor Avatar asked Sep 04 '19 20:09

Héctor


People also ask

Can not run test IntelliJ?

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.

How do I generate test cases automatically in IntelliJ?

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.

How do I view test cases in IntelliJ?

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.


1 Answers

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

like image 154
Prat S Avatar answered Sep 19 '22 03:09

Prat S