xcodexctestxcode14

Xcode unit tests run "clone" iOS simulators


In Xcode, running unit testing targets seems to be creating iOS Simulator 'clones' (named "Clone 1 of iPhone..." and "Clone 2 of iPhone...").

On older machines, this can take a long time. This is happening every time when switching from running the App and running tests. For example, running the App will launch the Simulator. Running tests will launch new one or more Simulators (Clone of ...), and running the App again will reload the original Simulator.

Any way to control this? This makes running tests a real pain on older machines.

Clone 1 and Clone 2


Solution

  • There is a setting for this in the Xcode build scheme. Click the scheme name in the toolbar of your project window, then go to Edit Scheme -> Test -> <your Test target> -> Options... and uncheck "Execute in parallel (if possible)".