When I run a test and the test fail and I press the button Rerun failed tests
I get the following error Test events where not received
No tests found for given includes
, but is weird because the test just run and failded, and when I try to rerun it with the button rerun test doesn't work.
I'm using gradle 6.8.1
intellij idea community edition 2020.3.2
and spring boot 2.4.2
this is my build.gradle
plugins {
id 'org.springframework.boot' version '2.4.2'
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
id 'java'
}
group = 'com.example'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '11'
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
repositories {
mavenCentral()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.mapstruct:mapstruct:1.4.2.Final'
annotationProcessor 'org.mapstruct:mapstruct-processor:1.4.2.Final'
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
}
test {
useJUnitPlatform()
}
this is my test
package com.example.map.struc.example;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
import static org.junit.jupiter.api.Assertions.assertTrue;
@SpringBootTest
class MapStrucExampleApplicationTests {
@Test
void contextLoads() {
}
@Test
void name() {
assertTrue(false);
}
}
question from:
https://stackoverflow.com/questions/66067860/not-test-found-with-gradle-and-intellij-only-when-press-rerun-failed-tests 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…