Xcode UI Tests are failing because of XCApplicationStateRunningActive on physical device

后端 未结 3 2045
轮回少年
轮回少年 2021-02-05 12:40

In my app I\'m adding some UI tests. With one test method everything works perfectly, but when I added second method, the test is failing because of the following error:

<
3条回答
  •  臣服心动
    2021-02-05 13:09

    This sounds like the app isn't being torn down correctly after the first test is completed. Try explicitly killing the app in your tear down method.

    - (void)tearDown {
        [[[XCUIApplication alloc] init] terminate];
        [super tearDown];
    }
    

提交回复
热议问题