相关疑难解决方法(0)

Android Studio + Spek集成

我正在尝试将Spek测试框架添加到我的Android Studio项目中.按照说明在这里,我最终添加以下内容到我的模块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'
Run Code Online (Sandbox Code Playgroud)

然后我注释了我的测试 @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

知道我错过了什么吗?

junit unit-testing kotlin android-studio-3.0 spek

5
推荐指数
1
解决办法
1349
查看次数

标签 统计

android-studio-3.0 ×1

junit ×1

kotlin ×1

spek ×1

unit-testing ×1