gojuno / composer

Reactive Android Instrumentation Test Runner. Archived. Marathon is recommended as an alternative (https://github.com/Malinskiy/marathon).
Apache License 2.0
546 stars 45 forks source link

Using --test-package to run specific tests is ignored #149

Closed niranjani23 closed 6 years ago

niranjani23 commented 6 years ago

When I use --test-package to specify specific test class, it ignores it and runs all the tests in the test package. Am currently using the latest jar (0.3.3). Could someone please take a look?

artem-zinnatullin commented 6 years ago

How do you pass --test-package?

Composer doesn't have such parameter on its own, see full list of supported parameters here https://github.com/gojuno/composer#optional

If your instrumentation test runner supports that, you can pass it as --instrumentation-arguments

niranjani23 commented 6 years ago

My bad! I was switching between different versions and forgot to use the correct jargons. For version 0.3.3, am using --instrumentation-arguments to mention the specific className:

java -jar ~/Documents/composer-0.3.3.jar \ --apk driver-app/build/outputs/apk/dev/debug/driver-app-dev-debug.apk \ --test-apk driver-app/build/outputs/apk/androidTest/dev/debug/driver-app-dev-debug-androidTest.apk \ --output-directory ~/Desktop/composer-output --instrumentation-arguments class com.lyft.android.uitests.ride.GoldenpathClassicRideTest \

But I notice that all tests are run and I have to wait for the entire duration of the test run to validate a single change.

artem-zinnatullin commented 6 years ago

lol wait you work at Lyft, lemme Slack u

artem-zinnatullin commented 6 years ago

The problem was caused by missing \ in bash script which resulted in --instrumentation-arguments class … not being concatenated with Composer params