Launch and Terminate application while executing

suggest change

Launch application for testing

app has to live beyond setUp so the test can use it. The class must be an XCTestCase and must import XCTest.

var app: XCUIApplication!

override func setUp() {
    super.setUp()
    app = XCUIApplication()
    app.launch()
}

Terminating application

func testStackOverflowApp() {
    app.terminate()
}

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents