testing-samples icon indicating copy to clipboard operation
testing-samples copied to clipboard

ScreenshotTestSample with Gradle Manged Devices and several shards generates screenshots for last shard only

Open sergio-sastre opened this issue 1 year ago • 0 comments

If I run ./gradlew nexusOneApi30DebugAndroidTest -Pandroid.experimental.androidTest.numManagedDeviceShards=2

I see the following in the terminal:

Task :app:nexusOneApi30DebugAndroidTest Starting 4 tests on nexusOneApi30_0 Starting 2 tests on nexusOneApi30_1

And then in the build folder only the screenshots for shard 1 are generated: those from shard 1 are missing: Screenshot 2024-01-06 at 09 14 51

Remarks: I've executed the command several times. Sometimes the first shard is assigned 2 tests, and the second 4, sometimes the first is assigned 4 and the second one 2. In both cases, only the screenshots of the second shard are generated in the corresponding folder

Expected: The screenshots of all shards are generated in the corresponding folder

sergio-sastre avatar Jan 06 '24 08:01 sergio-sastre