お世話になります。
Groovyでテストコードを書いていますが、「No tests found for given includes」になってしまいます。
どなたかご教授をお願いします。
◆環境
開発環境:intelliJ IDE
言語:Kotlin
テストコードの言語:Groovy
・テストコード import com.example.demo5.model.LoginModel import spock.lang.Specification class LoginUseCaseTest extends Specification{ def "テストケース"(){ given: def traget = new LoginUseCase() def loginModel = new LoginModel("123456","12345678") when: def result = traget.validatorLoginCheck(loginModel) then: !result } }
・build.gradle.kts plugins { id("org.springframework.boot") version "2.3.7.RELEASE" id("io.spring.dependency-management") version "1.0.10.RELEASE" kotlin("jvm") version "1.3.72" kotlin("plugin.spring") version "1.3.72" } group = "com.example" version = "0.0.1-SNAPSHOT" java.sourceCompatibility = JavaVersion.VERSION_1_8 repositories { mavenCentral() } dependencies { implementation("org.springframework.boot:spring-boot-starter-data-jdbc") implementation("org.springframework.boot:spring-boot-starter-security") implementation("org.springframework.boot:spring-boot-starter-thymeleaf") implementation("org.springframework.boot:spring-boot-starter-web") implementation("org.springframework.boot:spring-boot-starter-web-services") implementation("com.fasterxml.jackson.module:jackson-module-kotlin") implementation("org.jetbrains.kotlin:kotlin-reflect") implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8") implementation("org.mybatis.spring.boot:mybatis-spring-boot-starter:2.1.4") implementation("org.springframework.session:spring-session-core") implementation("org.thymeleaf.extras:thymeleaf-extras-springsecurity5") implementation("org.springframework.boot:spring-boot-starter-validation") implementation("javax.validation:validation-api:2.0.1.Final") implementation("org.codehaus.groovy:groovy-all:1.8.0") implementation("org.spockframework:spock-core:0.5-groovy-1.8") implementation("org.springframework.boot:spring-boot-starter-groovy-templates") runtimeOnly ("org.hibernate.validator:hibernate-validator:6.0.17.Final") developmentOnly("org.springframework.boot:spring-boot-devtools") runtimeOnly("mysql:mysql-connector-java") testImplementation("org.springframework.boot:spring-boot-starter-test") { exclude(group = "org.junit.vintage", module = "junit-vintage-engine") } testImplementation("org.springframework.security:spring-security-test") } tasks.withType<KotlinCompile> { kotlinOptions { freeCompilerArgs = listOf("-Xjsr305=strict") jvmTarget = "1.8" } } tasks.withType<Test> { useJUnitPlatform() }
あなたの回答
tips
プレビュー