There is some confusion about the feasibility of executing iOS simulator based UI testing in macOS VMs. Anka macOS VMs provide pretty much all capabilities of macOS running on hardware to set up a scalable, agile CI infrastructure for building and testing iOS applications. Since iOS simulator uses software-based rendering for graphics, it can run and execute all UI and non-UI based testing inside Anka VMs.
We have detailed steps to set up and run iOS builds and tests in Anka Build macOS cloud our blogs. Here is a quick summary of these steps – Setup Anka Build on a cluster of mac build machines, bootstrap your test Anka VM template with all relevant test framework dependencies, push this VM template to the Anka Registry and integrate Anka Build Controller to communicate with your CI tool.
When you execute iOS simulator test jobs in your CI tool, the job will automatically provision multiple isolated, concurrent macOS VMs from the uploaded VM template and execute UI test jobs. The VMS can be configured to be deleted after the job or kept alive for troubleshooting purposes. Every execution of the UI test job provisions new VMs, hence there is no leakage of any environment variables or dependencies and the UI tests run in a predictable manner.
View a demo of XCUITest execution in dynamically provisioned concurrent Anka Build VMs – https://youtu.be/wivotJuku24