pxctest icon indicating copy to clipboard operation
pxctest copied to clipboard

Run different tests on different simulators in parallel

Open nabsofken opened this issue 7 years ago • 10 comments

So I can run the same tests in parallel in different simulators but is it possible to run different tests at the same time?

nabsofken avatar Feb 09 '17 14:02 nabsofken

Do you mean splitting a test target of 100 tests into two parts and then run them at the same time in two different Simulators?

plu avatar Feb 09 '17 14:02 plu

yes

nabsofken avatar Feb 09 '17 14:02 nabsofken

You can try the --partitions 2 option, but it's still experimental! You also need to install the current master.

plu avatar Feb 09 '17 14:02 plu

oh cool thanks I will try that

nabsofken avatar Feb 09 '17 14:02 nabsofken

did that work for you?

amesandy-zz avatar Apr 03 '17 14:04 amesandy-zz

As I understand, --partitions 2 will run separate test targets in parallel. What about splitting 1 target into couple parts and run these in parallel?

P.S.: When I use xctest run-tests --destination 'name=iPhone 6,os=iOS 10.2' --destination 'name=iPhone 5s,os=iOS 10.2' --testrun build/Products/TestUI_iphonesimulator10.2-x86_64.xctestrun --partitions 2 it gives me an error: nilError I have 2 UI test targets in project.

JuliaGrasevych avatar Apr 05 '17 12:04 JuliaGrasevych

I have the same error as Julia.

RichardGuion avatar May 18 '17 22:05 RichardGuion

I am looking for the same scenario, running different test classes on different simulators. I think we can do it by

[-only-testing:] [-skip-testing:]

I didn't try yet, but I will update if I succeed on that :) and let me know if anyone has done that before.

maryamaffinityclick avatar Nov 30 '17 17:11 maryamaffinityclick

Did anyone get it working in this fashion? Sharding multiple tests from same target/scheme to multiple emulators?

benmarten avatar May 17 '18 22:05 benmarten

@benmarten Yeah I achieved something you can read what I have done -> https://medium.com/@Maryamfekri/how-to-run-uitest-for-messaging-features-in-an-ios-application-777de0440b99 with passing some environment variable and running two test cases in parallel with only-testing !

maryamaffinityclick avatar May 18 '18 13:05 maryamaffinityclick