square / spoon

Distributing instrumentation tests to all your Androids.
https://square.github.io/spoon/
Apache License 2.0
2.7k stars 477 forks source link

[bug] Coverage files getting overwritten for non --single-instrumentation-call Spoon task #582

Closed psrajat closed 3 years ago

psrajat commented 3 years ago

The multi instrumented spoon task (where --single-instrumentation-call is not provided as an argument) works by running command adb shell am instrument https://developer.android.com/studio/test/command-line#RunTestsDevice for each test case.

If the coverage flag is enabled for spoon task, it will create a coverage file for each test case. This behavior is not causing any problems for --single-instrumentation-call tasks. But for multi instrumented tasks, The coverage file of previous test gets replaced when the next test runs because each file have the same name (coverage.ec).

This change solves the issue by pulling the file from device after each test runs and in the merging the all the *.ec files into one.

Coverage file for each test will be available to the user with a proper naming convention for debugging purposes.

psrajat commented 3 years ago

Hi @edenman I have also fixed the Travis CI's Android license acceptance issue.

edenman commented 3 years ago

Thanks again @rajat-bb!

mdenissov commented 3 years ago

Looks like the spoon-runner:2.0.0-SNAPSHOT has not been uploaded to the sonatype snapshot repository

Spoon runner: https://oss.sonatype.org/#nexus-search;gav~com.squareup.spoon~spoon-runner~~~~kw,versionexpand Uploaded Date: Wed Oct 03 2018 06:43:05 GMT+0700 (Novosibirsk Standard Time)

Spoon client: https://oss.sonatype.org/#nexus-search;gav~com.squareup.spoon~spoon-client~~~~kw,versionexpand Uploaded Date: Fri Nov 06 2020 03:23:47 GMT+0700 (Novosibirsk Standard Time)

OlliZi commented 2 years ago

Please, where can i download the release build for the spoon-runner (master)?