Launch and Terminate application while executing
suggest changeLaunch 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()
}
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents