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
I write testcase in main dictory rather than test dictory , and run testcase with :adb shell am instrument xxx,
then it report error:"Caused by: java.lang.IllegalArgumentException: Could not find extra class de.mannodermaus.junit5.AndroidJUnit5Builder"
And I found out that the android-test.apk include the AndroidJUnit5Builder.class ,but the release.apk didnot include the AndroidJUnit5Builder.class, the plugin do something to pack the class to apk file.
So is there a way to use am instrument commond to run junit5 testcase ?
The text was updated successfully, but these errors were encountered:
It's possible that this sort of unusual use case isn't supported from the Android side, which is why it won't pick up anything outside androidTest for running as an instrumentation test. Are you saying that you can write testcases in the main directory with JUnit 4, but it doesn't work with JUnit 5? Or is this a general question about how to make this use case work? (If it's the latter, then I'm afraid we can't do anything about it since the Android instrumentation itself would need to be changed first).
In fact, this project provides a plugin for users to use. The plugin packs the junit5 library internally.
Can it be packed as an aar ,so that users can directly use the aar in the project?
yanweishr
changed the title
How to use android command: am instrument to run testcase if testcase writed in main dictory rather than test dictory?
How to use android command: am instrument to run testcase if testcase writed in main directory rather than test dictory?
Oct 21, 2024
yanweishr
changed the title
How to use android command: am instrument to run testcase if testcase writed in main directory rather than test dictory?
How to use android command: am instrument to run testcase if testcase writed in main directory rather than test directory?
Oct 21, 2024
I write testcase in main dictory rather than test dictory , and run testcase with :adb shell am instrument xxx,
then it report error:"Caused by: java.lang.IllegalArgumentException: Could not find extra class de.mannodermaus.junit5.AndroidJUnit5Builder"
And I found out that the android-test.apk include the AndroidJUnit5Builder.class ,but the release.apk didnot include the AndroidJUnit5Builder.class, the plugin do something to pack the class to apk file.
So is there a way to use am instrument commond to run junit5 testcase ?
The text was updated successfully, but these errors were encountered: