Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solution for a parallel tests launching #19

Open
ivangrebeniuk opened this issue Jul 21, 2022 · 1 comment
Open

Solution for a parallel tests launching #19

ivangrebeniuk opened this issue Jul 21, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@ivangrebeniuk
Copy link

Feature request

Solution to run UI test in parallel mode and use SimctlCLI

Describe the solution you'd like

First of all I'd like to thank you for SwiftSImctlCLI tool, it's great and handy, thanks!
SimctlCLI locally works awesome, but I've faced with an issue when launching tests on CI with parallel mode:
I run UI tests in parallel mode, 6 simulators simultaneously to speed up the process, for this purpose we use Teamcity + Fastlane and native XCUITests. In this case SimctlCLI does not work and all tests fail with an error, I suppose it happens because every simulator has it's own device ID.
If I run my tests on CI without parallelisation, in this case SimctlCLI works as expected and tests are passed successfully.
Are there any solutions to use SimctCLI with parallel launching? If it is somehow possible, it would be great to add description of this feature to the documentation.
If it's not possible now, how do you think about implementing support of parallel testing?

Additional context

Thank you!

@ivangrebeniuk ivangrebeniuk added the enhancement New feature or request label Jul 21, 2022
@jkuchar
Copy link

jkuchar commented Apr 3, 2023

As parallel run is default, when you set up UI tests I had run into the issue and found solution, that is surprisingly straightforward! cc @ctreffs

The Problem

The whole thing is almost ready for parallel testing. There is just need to provide correct --set testing to xcrun and it will start working. :)

image

The Solution

Server listening on port 50430...
Command: xcrun simctl --set testing uninstall 7B250A2C-488B-4783-BCB8-C76A97F9E3EB com.ivyassistant.ivy.mobile.ios
Success: 

The Fix

The best way would be to have some kind of parallel parameter, which changes the --set which is used with simctl tool for parallel cloned devices.

I'm not good in the Swift development but at least I have found the fix, that will make the whole tool to work with parallel environment (unfortunately stops working with the serial one).

There need to provide parameter for binary OR configuration if in SwiftClient OR detecting evenironment and passing the information over the HTTP parameter.

I will provide draft fix in PR (here is the key)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants