I have a class teardown which is trying to remove the app, but it doesn\'t recognize app.terminate().
class DeviceSettingsUtilities : UITestUtilities {
func remo
The app is not being reset when you put the code in the class tearDown
method because that method only runs once all the tests in the class are complete. The instance tearDown
is the best place to put code that you want to run after every test.
From Apple's documentation:
For each class, testing starts by running the class setup method. For each test method, a new instance of the class is allocated and its instance setup method executed. After that it runs the test method, and after that the instance teardown method. This sequence repeats for all the test methods in the class. After the last test method teardown in the class has been run, Xcode executes the class teardown method and moves on to the next class. This sequence repeats until all the test methods in all test classes have been run.