bitrise-steplib / steps-virtual-device-testing-for-android

MIT License
22 stars 23 forks source link

ClassNotFoundExceptions in instrumentation tests #30

Closed koral-- closed 5 years ago

koral-- commented 5 years ago

Build URL: https://app.bitrise.io/build/529e4df27b153491 Project source code: https://github.com/koral--/android-gif-drawable/

When using this step there are exceptions like java.lang.ClassNotFoundException: androidx.core.app.CoreComponentFactory. They do not occur when invoking test directly on firebase (w/o Bitrise) like this: gcloud firebase test android run --type instrumentation --test <test apk path> --device model=NexusLowRes,version=24,locale=en,orientation=portrait --app <apk path>

So it seems that something may be broken in Bitrise VDT API service.

godrei commented 5 years ago

Hi @koral-- , it seems you test the release.apk with the debug-androidTest.apk, is it possible that the flavor mismatch causes this issue?

koral-- commented 5 years ago

Thanks, not really the same case, but hint is somehow useful.

That release apk is only served as a dummy one due to FTL limitation. We must provide some apk under test even if tested project is a library which does not compile to APK.

In this case path to testing APK is incorrect. It should point to another APK. I need to adjust filters in gradle-runner step.