You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I convert MainActivityTest.java to kotlin, it gives below error:
$ adb shell am instrument -w -r -e notPackage org.bouncycastle.pqc.crypto.qtesla -e debug false -e class 'io.appflate.restmock.androidsample.tests.MainActivityTest' io.appflate.restmock.androidsample.test/io.appflate.restmock.androidsample.CustomTestRunner
Connected to process 8637 on device 'lge-nexus_5x-024c6d7f5e96d337'.
Started running tests
java.lang.ClassNotFoundException: io.appflate.restmock.androidsample.tests.MainActivityTest
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:400)
at androidx.test.internal.runner.TestLoader.doCreateRunner(TestLoader.java:72)
at androidx.test.internal.runner.TestLoader.getRunnersFor(TestLoader.java:104)
at androidx.test.internal.runner.TestRequestBuilder.build(TestRequestBuilder.java:793)
at androidx.test.runner.AndroidJUnitRunner.buildRequest(AndroidJUnitRunner.java:547)
at androidx.test.runner.AndroidJUnitRunner.onStart(AndroidJUnitRunner.java:390)
at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1932)
Caused by: java.lang.ClassNotFoundException: Didn't find class "io.appflate.restmock.androidsample.tests.MainActivityTest" on path: DexPathList[[zip file "/system/framework/android.test.runner.jar", zip file "/data/app/io.appflate.restmock.androidsample.test-1/base.apk", zip file "/data/app/io.appflate.restmock.androidsample-2/base.apk"],nativeLibraryDirectories=[/data/app/io.appflate.restmock.androidsample.test-1/lib/arm64, /data/app/io.appflate.restmock.androidsample-2/lib/arm64, /system/lib64, /vendor/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
... 8 more
Tests ran to completion.
The text was updated successfully, but these errors were encountered:
And: Is this library end of life? Because we need to test co-routines but adding kotlin to the example project gives errors and it's not clear whether it is going to work.
Hey Jim, sorry for the late answer. When it comes to kotlin support, library works perfectly fine. I've used it in dozens of kotlin projects. I wouldn't consider the library end-of-life as I'm using it on a daily basis. The plan is for the next major version to port it entirely to kotlin.
Can't really say what's the problem is based only on the stacktrace. Have you tried to run the tests from command line with ./gradlew cDAT command?
When I convert
MainActivityTest.java
to kotlin, it gives below error:The text was updated successfully, but these errors were encountered: