Cucumber Android Run on CI failing
See original GitHub issueDescribe the bug Marathon execution failing on CI. Local execution is working fine. When running on CI, It fails with the following
E 12:25:59.962 [main] <com.malinskiy.marathon.Marathon> com.malinskiy.marathon.exceptions.NoTestCasesFoundException: No tests cases were found
Tests are running on Cucumber, We added config for running a specific tag on marathon file like following
testParserConfiguration:
type: remote
instrumentationArgs:
tags: "@batch-2"
features: "features"
glue: "com.app.test"
monochrome: true
To Reproduce Steps to reproduce the behaviour:
name: "android-cucumber-app-tests"
outputDir: "build/reports/marathon"
isCodeCoverageEnabled: true
screenRecordingPolicy: "ON_ANY"
testClassRegexes:
- ".*"
retryStrategy:
# type: "no-retry"
type: "fixed-quota"
totalAllowedRetryQuota: 10
retryPerTestQuota: 2
vendorConfiguration:
type: "Android"
applicationApk: "${APK_PATH}"
testApplicationApk: ${TEST_APK_PATH}
autoGrantPermission: true
instrumentationArgs:
debug: "false"
applicationPmClear: false
testApplicationPmClear: false
vendor: ADAM
waitForDevicesTimeoutMillis: 1000000
adbInitTimeoutMillis: 60000
fileSyncConfiguration:
pull:
- relativePath: "Android/data/cucumber.cukeulator"
aggregationMode: TEST_RUN
testParserConfiguration:
type: remote
instrumentationArgs:
tags: "@mocked-batch2"
features: "features"
glue: "com.app.test"
monochrome: true
screenRecordConfiguration:
preferableRecorderType: "screenshot"
videoConfiguration:
enabled: true
width: 1080
height: 1920
bitrateMbps: 2
timeLimit: 300
screenshotConfiguration:
enabled: false
width: 1080
height: 1920
delayMs: 200
deviceInitializationTimeoutMillis: 1000000
Expected behavior Run the tests on emulators created on CI machine (macos-latest)
Logs and reports
▸ D 07:14:20.667 [DeviceMonitor] <AdamDeviceProvider> Device emulator-5554 changed state to CONNECTED
1056
[07:14:20]: ▸ D 07:14:20.668 [DeviceMonitor] <AdamDeviceProvider> Device emulator-5556 changed state to CONNECTED
1057
[07:14:20]: ▸ D 07:14:20.796 [AndroidDevice - execution - 127.0.0.1:5037:emulator-5554-2] <AndroidDevice> Device 127.0.0.1:5037:emulator-5554 booted!
1058
[07:14:21]: ▸ D 07:14:21.043 [AndroidDevice - execution - 127.0.0.1:5037:emulator-5556-1] <AndroidDevice> Device 127.0.0.1:5037:emulator-5556 booted!
1059
[07:14:22]: ▸ D 07:14:22.174 [main] <AndroidAppInstaller> Installing application output to 127.0.0.1:5037:emulator-5554
1060
[07:14:22]: ▸ I 07:14:22.655 [main] <AndroidAppInstaller> Installing com.app, /Users/runner/work/appAndroid/appAndroid/apk/build/app_8.8.1-beta_1616.apk to 127.0.0.1:5037:emulator-5554
1061
[07:14:28]: ▸ D 07:14:28.981 [main] <AndroidDevice> Transferred app_8.8.1-beta_1616.apk to/from 127.0.0.1:5037:emulator-5554. 26921.26 KB/s (170277110 bytes in 6.3250)
1062
[07:14:32]: ▸ D 07:14:32.975 [main] <AndroidDevice> /data/local/tmp/app_8.8.1-beta_1616.apk synced in 3289ms
1063
[07:14:47]: ▸ D 07:14:47.685 [main] <AndroidAppInstaller> Success
1064
[07:14:47]: ▸ D 07:14:47.687 [main] <AndroidAppInstaller> Installing instrumentation package to 127.0.0.1:5037:emulator-5554
1065
[07:14:48]: ▸ I 07:14:48.069 [main] <AndroidAppInstaller> Installing com.app.test, /Users/runner/work/appAndroid/appAndroid/apk/test/app-app-debug-androidTest.apk to 127.0.0.1:5037:emulator-5554
1066
[07:14:49]: ▸ D 07:14:49.030 [main] <AndroidDevice> Transferred app-app-debug-androidTest.apk to/from 127.0.0.1:5037:emulator-5554. 26397.50 KB/s (25368823 bytes in 0.9610)
1067
[07:14:49]: ▸ D 07:14:49.554 [main] <AndroidDevice> /data/local/tmp/app-app-debug-androidTest.apk synced in 449ms
1068
[07:14:52]: ▸ D 07:14:52.951 [main] <AndroidAppInstaller> Success
1069
[07:14:52]: ▸ D 07:14:52.952 [main] <AndroidAppInstaller> Prepare installation finished for 127.0.0.1:5037:emulator-5554
1070
[07:16:10]: ▸ W 07:16:10.872 [main] <c.m.m.android.adam.RemoteTestParser> Bundle /Users/runner/work/appAndroid/appAndroid/apk/test/app-app-debug-androidTest.apk did not report any test annotations. If you need test annotations retrieval, remote test parser requires additional setup see https://marathonlabs.github.io/marathon/ven/android.html#test-parser
1071
[07:16:10]: ▸ E 07:16:10.880 [main] <com.malinskiy.marathon.Marathon> com.malinskiy.marathon.exceptions.NoTestCasesFoundException: No tests cases were found
1072
[07:16:10]: ▸ marathon v0.7.0: Test run failed
Devices (please complete the following information):
- Device:
- echo no | avdmanager --verbose create avd -f -n parallel_2 -k "system-images;android-29;google_apis;x86" --tag "google_apis" --abi "x86"
emulator -avd parallel_1 -skin 768x1280 -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none -verbose &
- OS: Android API 29 emulator
Issue Analytics
- State:
- Created a year ago
- Comments:12 (7 by maintainers)
Top Results From Across the Web
Cucumber + Android x + Custom Instrumentation = failure to ...
Looks like AndroidJUnitRunner is somehow interfering with CustomInstrmentationRunner. Here is the error: No tests found. This usually means that ...
Read more >Instrumentation run failed due to 'java.io.IOException' - Stack ...
I get this error when running my Cucumber-jvm tests with Gradle on an Android emulator. ... The debug error: Executing task ':app:connectedDebugAndroidTest' (up- ......
Read more >Be Da Developer, Cucumber on Android | by Emma Suzuki
Run · Open “Edit Configuration” · Click + on left panel and select “Android Instrumented Tests” · Put a name you like to...
Read more >Debugging - Cucumber Documentation
Run your RunCucumberTest in debug mode. The execution will stop at your breakpoint. Now you can either: Step into to start debugging the...
Read more >Unit test reports - GitLab Docs
It is very common that a CI/CD pipeline contains a test job that verifies your code. If the tests fail, the pipeline fails...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Reproduced. Looking into the problem
@anas-baadshah Please close this if the issue was resolved since the problem was due to apk corruption