When I have ANDROIDX_TEST_ORCHESTRATOR
in testOptions
testOptions {
unitTests.includeAndroidResources = true
animationsDisabled = true
execution 'ANDROIDX_TEST_ORCHESTRATOR'
}
and I run the instrumented test
./gradlew connectedStudioDebugAndroidTest --stacktrace
I get error that tests are not found
com.android.builder.testing.ConnectedDevice > No tests found.[emu1(AVD) - 9] FAILED
No tests found. This usually means that your test classes are not in the form that your test runner expects (e.g. don't inherit from TestCase or lack @Test annotations).
and when I comment out ANDROIDX_TEST_ORCHESTRATOR
in testOptions
testOptions {
unitTests.includeAndroidResources = true
animationsDisabled = true
// execution 'ANDROIDX_TEST_ORCHESTRATOR'
}
the tests run.
So how can I get tests to run with ANDROIDX_TEST_ORCHESTRATOR
?
edit
I made some progress: the androidTests run on my real device (API 28) but not any emulator (API 28). I'm on OSX btw.
This seems to be a bug in ANDROIDX_TEST_ORCHESTRATOR
version 1.2.0
and older.
I got it to work by bumping the version to 1.3.0-rc01
in the dependencies
in the build.gradle
file.
androidTestUtil 'androidx.test:orchestrator:1.3.0-rc01'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With