-
-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
On-device test parser #539
Conversation
e09ce9b
to
bb4a3bf
Compare
Codecov Report
@@ Coverage Diff @@
## develop #539 +/- ##
=============================================
- Coverage 66.72% 64.76% -1.96%
- Complexity 539 687 +148
=============================================
Files 121 166 +45
Lines 2398 3312 +914
Branches 325 565 +240
=============================================
+ Hits 1600 2145 +545
- Misses 623 880 +257
- Partials 175 287 +112
Continue to review full report at Codecov.
|
… feature/device-test-parser
… feature/device-test-parser # Conflicts: # buildSrc/src/main/kotlin/Versions.kt # vendor/vendor-android/base/src/main/kotlin/com/malinskiy/marathon/android/RemoteFileManager.kt
There is an experimental way to extract annotations using on-device parser: https://github.com/Malinskiy/adam/blob/feature/test-meta-listener/android-junit4-listener/src/main/kotlin/com/malinskiy/adam/junit4/android/listener/TestAnnotationProducer.kt The idea is to attach a RunListener to the execution using In order to use this users will have to declare a
Then in the parser annotations will be picked up if present. To allow contract changes (e.g. annotation values) we have to version the instrumentation parameter name. |
for (update in channel) { | ||
if (update is DeviceProvider.DeviceEvent.DeviceConnected) { | ||
val device = update.device as AdamAndroidDevice | ||
return parseTests(device, configuration, vendorConfiguration, testBundles) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First connected device will be used for test parsing? Should we have some retry logic here to prevent flakiness if connection is not stable and so on?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, will do
# Conflicts: # buildSrc/src/main/kotlin/Versions.kt # cli/src/main/kotlin/com/malinskiy/marathon/cli/args/FileAndroidConfiguration.kt # cli/src/main/kotlin/com/malinskiy/marathon/cli/config/DeserializeModule.kt # configuration/src/main/kotlin/com/malinskiy/marathon/config/serialization/yaml/TestParserConfigurationDeserializer.kt # core/src/main/kotlin/com/malinskiy/marathon/execution/TestParser.kt # vendor/vendor-android/adam/src/main/kotlin/com/malinskiy/marathon/android/adam/AndroidDeviceTestRunner.kt # vendor/vendor-android/adam/src/main/kotlin/com/malinskiy/marathon/android/adam/di/Modules.kt # vendor/vendor-android/base/src/main/kotlin/com/malinskiy/marathon/android/AndroidTestParser.kt # vendor/vendor-android/base/src/main/kotlin/com/malinskiy/marathon/android/configuration/AndroidConfiguration.kt # vendor/vendor-android/base/src/test/kotlin/com/malinskiy/marathon/android/AndroidTestParserTest.kt # vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/IOSTestParser.kt # vendor/vendor-ios/src/test/kotlin/com/malinskiy/marathon/ios/IOSTestParserTest.kt # vendor/vendor-test/src/main/kotlin/com/malinskiy/marathon/test/factory/ConfigurationFactory.kt
- print message when test is ignored - trim annotations when parsing - fix test request for test without methods - fix TestRunResultsListener to report null methods if they were requested - fix cli package resource copying bug during build
…, add docs and an execution warning when no annotations are reported
… feature/device-test-parser
Enabled on adam by default
Currently loses any annotations associated with tests unless a listener is attached to the test parsing, so annotation filter will not work. This is because
am instrument
doesn't output any annotations.Closes #393
Depends on #538