Skip to content

Conversation

@mokagio
Copy link
Contributor

@mokagio mokagio commented May 29, 2023

@jostnes and @tiagomar have done great work recently tidying up UI tests. Still, I keep experiencing CI failures. Maybe I'm jinxed 😅

For example, I was doing experiments to try understand what could have introduced all the "could not launch app" CI logs and I got a string of failures. These changes were the only ones that resulted in a green build.

Note: I didn't try more launches. Given I've only experienced failures recently, this seems like an improvement already.

Keen to hear what you think!

@wpmobilebot
Copy link
Contributor

wpmobilebot commented May 29, 2023

WordPress Alpha📲 You can test the changes from this Pull Request in WordPress Alpha by scanning the QR code below to install the corresponding build.
App NameWordPress Alpha WordPress Alpha
ConfigurationRelease-Alpha
Build Numberpr20751-eca05e6
Version22.6
Bundle IDorg.wordpress.alpha
Commiteca05e6
App Center BuildWPiOS - One-Offs #5944
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.

@mokagio mokagio force-pushed the mokagio/address-ui-tests-failures-20230529 branch from bc849ed to c5771cf Compare May 29, 2023 08:25
@wpmobilebot
Copy link
Contributor

wpmobilebot commented May 29, 2023

Jetpack Alpha📲 You can test the changes from this Pull Request in Jetpack Alpha by scanning the QR code below to install the corresponding build.
App NameJetpack Alpha Jetpack Alpha
ConfigurationRelease-Alpha
Build Numberpr20751-eca05e6
Version22.6
Bundle IDcom.jetpack.alpha
Commiteca05e6
App Center Buildjetpack-installable-builds #4972
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.

Base automatically changed from release/22.5 to trunk June 10, 2023 10:16
@mokagio mokagio force-pushed the mokagio/address-ui-tests-failures-20230529 branch from 27ab2b3 to eca05e6 Compare June 13, 2023 04:09
@mokagio mokagio marked this pull request as ready for review June 13, 2023 05:53
@mokagio mokagio requested a review from a team as a code owner June 13, 2023 05:53
@peril-wordpress-mobile
Copy link

Warnings
⚠️ PR is not assigned to a milestone.

Generated by 🚫 dangerJS

@mokagio mokagio enabled auto-merge June 13, 2023 05:54
// alert where "Save Password" is.
app.buttons["Not Now"].tap()
}
app.dismissSavePasswordPrompt()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We are calling the new dismissSavePasswordPrompt() logic in three different places.

There might be a more centralized location for this. At the moment, I'm more interested in getting the builds to a stable place. We can refactor later.

Copy link
Contributor

@jostnes jostnes left a comment

Choose a reason for hiding this comment

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

i probably need to start using 14.3 locally to start seeing these issues 😅

i had a look at the logs of the failing builds and it seems like the failures are all related to the save password prompt (notice how the prompt is there on different screens, i too am not sure where the ideal location for this dismissal is for now...):

image image

calling dismissSavePasswordPrompt() to cover more login paths look to be a good solution in this case 👍

@mokagio mokagio merged commit 39d8e78 into trunk Jun 13, 2023
@mokagio mokagio deleted the mokagio/address-ui-tests-failures-20230529 branch June 13, 2023 06:55
@mokagio
Copy link
Contributor Author

mokagio commented Jun 13, 2023

Thanks for the quick review @jostnes.

Unfortunately, this still doesn't address all our issues 😞

I have a build that uses these changes and still got the failed to launch errors. Oh well... one step at a time, I guess.

image

@tiagomar
Copy link
Contributor

@mokagio, these launch errors are not making tests to fail. As I mentioned here, they are related to removing the app after each test which was introduced here, here's a build. As an example, here's how the logs looked like before that.

The 2023-06-13 06:42:10.348 xcodebuild[1850:19987] iOSSimulator: 0BCA1D2A-521D-4181-8B21-EBCA2EE4FD36: Failed to launch app with identifier: com.automattic.jetpack (...) happens after each and every test, not associated with test results.

image

Using the build you've mentioned as reference, the xcresult file available in Artifacts shows only 2 failed tests, with 3 failed executions each, while all the other passed in the first try.

image

The two failed tests failed with regular timeouts, so nothing to do with app not being launched.

One of the executions displays this spinning wheel over the button. That's a known one, really hard to reproduce locally but most times pass in automatic retry. 😓 image
The others are the Save Password dialog. image

@mokagio
Copy link
Contributor Author

mokagio commented Jun 14, 2023

Thanks @tiagomar for the detailed info 🙌

🤔 I'm not sure then why Test Analytics is picking them up as the failure message. Maybe something to do with how XCTest logs errors etc. 🤷‍♂️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants