Xcode iOS UI tests crash with SIGABRT when multiple test classes exist
<p>I am developing an iOS app using XCUITest methods for testing the interface. I have a basic UI test set up in a first file <code>AppUITests.swift</code> which does <code>let app = XCUIApplication()</code> as member of the <code>XCTestCase</code> subclass, and later does <code>app.launch()</code> in the <code>setUp()</code> method. All is well for tests in this file.</p>

<p>I wanted to create a new test suite for UI tests JUST in the first main "mode" of the application, so I created a new file <code>MainModeUITests.swift</code> and copied the same code over. My plan of course was to test the UI workflows in this mode, but in this new file the application crashes with <code>signal SIGABRT</code> at the line where <code>XCUIApplication()</code> is called.</p>

<p>Currently I am testing on simulator and haven't even gotten to device testing yet. Any ideas why <code>SIGABRT</code> would be thrown at the application by the UITesting? Is there a reason why I can't call this in different test suites? Is there a way to even separate out UI tests into multiple swift files?</p>