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

Auto sharding is distributing testcases improperly, resulting into one device with max number of testcases #565

Closed alphaguy4 closed 5 years ago

alphaguy4 commented 5 years ago

Hi i am trying to split and execute testcases using --shard on two devices. However, i noticed it distributed testcases un-evenly between two devices.

Is there a way we can know how many testcases are alloted to each device and what are those testcases? We can get this after testcases are executed from the spoon-output but it's too late to realise one device was done with executing testcases way before the second device because later devices has more number of testcases. This beats the purpose of running testcases in parallel.

Also, can we know how many testcases are picked up by spoon for sharding, i can see there are 2500+ testcases in my test package but it is picking only 1100 or sometimes 1400.

Please help me debug this. Thanks in advance!

alphaguy4 commented 5 years ago

Thanks solved my problem.

oldLady commented 4 years ago

@alphaguy4 Can you share the solution and root cause of your problem?