How do I write a UI Test for verifying my macOS app launches? (Xcode 15, macOS 13.1)

47 Views Asked by At

I'm looking to start simple and have a basic UI test that verifies my app launches. What I found so far doesn't seem to work though...

What I have is this:

func testAppDoesLaunch() {
    let app = XCUIApplication()
    app.launch()
    XCTAssertTrue(app.exists, "App did launch."
}```


The error I'm getting is:

testAppDoesLaunch(): Device is not configured for UI testing - use of XCUIApplication is not supported. This can happen when XCUIApplication is used in a unit test bundle instead of a UI test bundle. (NSInternalInconsistencyException)
0

There are 0 best solutions below