Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[UI Tests] Examine / address flakiness in History tests. #1551

Merged
merged 11 commits into from
Jan 25, 2024

Conversation

pachlava
Copy link
Contributor

@pachlava pachlava commented Jan 22, 2024

Fix

History tests demonstrated flakiness. E.g. here and here. This was not reproducible locally. The fix consists of two parts:

  1. 50279cb: Fix the name of the xcresult log file, so that it's actually copied as BK artifact. Without the log, it was not clear what was going wrong on CI.
  2. b7f407d: adds handling of "Save Password" to one more place. After finally seeing the video / screenshots from the copied log, it was clear that the tests were blocked because of the "Save Password" prompt which was shown at the test start. Even though this prompt is handled during the login process, in these cases of fails it looks like the Simulator was already launched in logged in state, with this alert being shown, and the tests could not handle it because it wasn't the part of login process. Why was it shown is a mystery to me, theoretically this should not happen because the Sim is reset before each run.
Screenshot 2024-01-23 at 14 23 15

Six subsequent green executions is not a hard proof of the fix success, but this deserves a chance to be tested in action, IMO.

Test

  • For the executed "UI Test" jobs, the "Artifacts" tab now contains the xcresult file.
  • 6 last executions in this PR are 🟢.

Review

Only one developer and one designer are required to review these changes, but anyone can perform the review.

Release

These changes do not require release notes.

@pachlava pachlava added the UIAutomation Automated UI tests label Jan 22, 2024
@pachlava pachlava added this to the Future milestone Jan 22, 2024
@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Jan 22, 2024

You can test the changes in simplenote-ios from this Pull Request by:
  • Clicking here or scanning the QR code below to access App Center
  • Then installing the build number pr1551-a04c1cf-018d3c63-0d90-496e-9d96-2f64417ac998 on your iPhone

If you need access to App Center, please ask a maintainer to add you.

@pachlava pachlava changed the title [WIP] [UI Tests] Examine / adress flakiness in History tests. [WIP] [UI Tests] Examine / address flakiness in History tests. Jan 23, 2024
@pachlava pachlava marked this pull request as draft January 23, 2024 12:27
@@ -38,6 +37,7 @@ class EmailLogin {
enterPassword(enteredValue: password)
app.buttons[UID.Button.logIn].tap()
handleSavePasswordPrompt()
waitForSpinnerToDisappear()
Copy link
Contributor Author

@pachlava pachlava Jan 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really a part of the fix, and not necessary, but it does not hurt, and does not occupy much time, since the function waits for the spinner to disappear. So, if the spinner was not there in the first place, it will be completed really fast.

@pachlava pachlava marked this pull request as ready for review January 24, 2024 17:28
@pachlava pachlava changed the title [WIP] [UI Tests] Examine / address flakiness in History tests. [UI Tests] Examine / address flakiness in History tests. Jan 25, 2024
@pachlava pachlava enabled auto-merge January 25, 2024 20:41
Copy link
Contributor

@tiagomar tiagomar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Today I realized I hadn't set this repo up since my trial 😓 ❤️

  • Xcresult file looks good
  • Tests are passing locally
  • I could notice EmailLogin.handleSavePasswordPrompt() working locally
  • CI is 🟢

:shipit:


echo "--- 🚦 Report Tests Status"
if [[ $TESTS_EXIT_STATUS -eq 0 ]]; then
echo "Unit Tests seems to have passed (exit code 0). All good 👍"
echo "UI Tests seems to have passed (exit code 0). All good 👍"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! =D

@pachlava pachlava merged commit 7625281 into trunk Jan 25, 2024
7 checks passed
@pachlava pachlava deleted the ui-tests-flakiness-fix branch January 25, 2024 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
UIAutomation Automated UI tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants