无法在kotlin多平台项目上运行单元测试
我正在尝试创建一个kotlin多平台库,稍后可以使用IDEA 2019.3 kotlin 1.3将其转换为java和javascript 我创建了一个简单的junit(4)测试类,并将其配置如下无法在kotlin多平台项目上运行单元测试,kotlin,intellij-idea,junit4,Kotlin,Intellij Idea,Junit4,我正在尝试创建一个kotlin多平台库,稍后可以使用IDEA 2019.3 kotlin 1.3将其转换为java和javascript 我创建了一个简单的junit(4)测试类,并将其配置如下 package sample; import org.junit.Test; public class Tests { @Test public void test1(){ System.out.println("here"); } } 但是,在运行时,它
package sample;
import org.junit.Test;
public class Tests {
@Test
public void test1(){
System.out.println("here");
}
}
但是,在运行时,它会失败
进程已完成,但未找到退出代码1类:“sample.DummyTest”
我不知道我做错了什么。请给出建议。检查您的类测试名称,它可能是:com.package.example.Tests 或者右键单击类并进行配置: 如果要在项目中运行所有测试(包括来自implements模块的UnitTest),请创建以下配置: 在渐变依赖项中检查此导入
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
谢谢你的回复,但这并没有真正的帮助