lundi 28 octobre 2019

Run UITests with different arguments in one session

I'm trying to run a UITest which requires to change launch arguments in the middle of the run and relaunch the application with new arguments. In theory, XCUIApplication.launch should do both terminating and relaunching the application with new arguments however I found it unreliable and not always happening. Then I switched to:

func launchAndWaitForLoadingViewFinish() {
    terminate()
    sleep(5)
    launch()
    waitOnLoadingView()
}

To terminate manually and then wait on to make sure it is closed and hopefully out of memory before relaunching the app. But still no luck and it fails from time to time. Any recommendation is highly appreciated.

Aucun commentaire:

Enregistrer un commentaire