Skip to content

Commit 5713706

Browse files
mokagiopachlava
andauthored
Terminate app in between UI tests and reset Simulator on launch (#17919)
This is an attempt to address certain flakiness issues. See also #17886 for more details on the rationale for the changes. All credits to @pachlava. Co-authored-by: pachlava <pachlava@gmail.com>
2 parents 6dffe97 + 4187cda commit 5713706

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

WordPress/WordPressUITests/Utils/XCTest+Extensions.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ extension XCTestCase {
1010
continueAfterFailure = false
1111

1212
let app = XCUIApplication()
13+
app.terminate()
1314
app.launchArguments = ["-wpcom-api-base-url", WireMock.URL().absoluteString, "-no-animations", "-ui-testing"]
1415
app.activate()
1516

fastlane/Fastfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -961,6 +961,7 @@ platform :ios do
961961
test_without_building: true,
962962
xctestrun: test_plan_path,
963963
output_directory: File.join(PROJECT_ROOT_FOLDER, 'build', 'results'),
964+
reset_simulator: true,
964965
result_bundle: true
965966
)
966967
end

0 commit comments

Comments
 (0)