黄瓜+ JUnit5 + Gradle + Kotlin

时间:2020-06-05 09:23:21

标签: kotlin junit cucumber

我正在尝试将黄瓜方案从JUnit 4移植到JUnit 5(以并行运行)

我有入门课程

package com.wms.test

@io.cucumber.junit.platform.engine.Cucumber
class MyTest

以及包含步骤定义的软件包:com.wms.test.glue。 另外,我在资源/功能中有功能文件。

我还在gradle.build中指定了junit属性:

dependencies {
    testImplementation
           "io.cucumber:cucumber-java8:5.7.0",
            "io.cucumber:cucumber-junit-platform-engine:5.7.0",
            "io.cucumber:cucumber-spring:5.7.0",
            "org.springframework.boot:spring-boot-starter-test"
}
test {
    useJUnitPlatform()
    systemProperties = [
            'cucumber.glue': 'com.wms.test.glue'
    ]
    testLogging {
        events "passed", "skipped", "failed"
    }
}

当我致电./gradlew测试时,我收到消息:

BUILD SUCCESSFUL in 3s
6 actionable tasks: 6 executed

没有测试在运行。

如果我致电Idea在MyTest上运行测试-

No tests found for given includes: [com.wms.test.MyTest](filter.includeTestsMatching)

请帮助

0 个答案:

没有答案