[Office Hours] SpeziScheduler Unstable UI testing #169
Unanswered
dusixian
asked this question in
Office Hours
Replies: 1 comment 2 replies
-
Involve @lukaskollmer @PSchmiedmayer in this discussion. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Related Discussion
Hi! Previously I created a PR to improve the documentation for SpeziScheduler. However, the UI tests failed twice. Since my PR only updates the documentation and doesn’t touch the core code, it shouldn’t affect the test results. I reviewed the UI test videos, and it seems like the failures are due to existing test instability. Let me explain:
app.assertNotificationDetails
method checks the notification label approximately every second. However, the interval isn’t perfectly precise — the check might occur just as the label changes from 10 seconds to 9 seconds, causing the assertion to fail. This randomness explains why the test passed on a re-run.assertNotificationDetails
to either check more frequently or allow both 9 seconds and 10 seconds as valid matches. Passing the test if either condition is met would make the test more reliable.app.buttons["Complete Enter Lab Results"].tap()
to dismiss the lab result notification. However, I couldn’t run the test locally — after click run this test in the sidebar, a successful build, the test immediately succeeds without actually executing. Could you guide me on how to properly run the test locally, since I don’t have permission to run GitHub Actions?I hope these insights contribute to more stable UI tests! I’m not sure if I can get everything fixed before the deadline, but I’m eager to improve the test logic. Meanwhile, maybe the PR can be reviewed based on the documentation changes, and I’d be happy to continue working on the test stability afterward.
Reproduction
None.
Additional context
No response
Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions