【发布时间】:2018-06-17 18:25:26
【问题描述】:
我正在尝试将 Spek 测试框架添加到我的 Android Studio 项目中。按照说明Here,我最终将以下内容添加到我的模块build.gradle:
testCompile 'org.jetbrains.spek:spek-api:1.1.5'
testCompile 'junit:junit:4.12'
testCompile "org.junit.platform:junit-platform-runner:1.0.0"
testRuntimeOnly 'org.jetbrains.spek:spek-junit-platform-engine:1.1.5'
然后我用@RunWith(JUnitPlatform::class)注释我的测试
但是,当我尝试运行测试时,我得到:
org.junit.platform.commons.util.PreconditionViolationException: Cannot create Launcher without at least one TestEngine; consider adding an engine implementation JAR to the classpath
知道我错过了什么吗?
【问题讨论】:
标签: unit-testing junit kotlin android-studio-3.0 spek