Skip to content

fix: Windows UI test automation #550

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

Merged
merged 12 commits into from
Aug 19, 2025
Merged

fix: Windows UI test automation #550

merged 12 commits into from
Aug 19, 2025

Conversation

CodeSchwert
Copy link
Collaborator

@CodeSchwert CodeSchwert commented Aug 18, 2025

Summary

ID-3920

Problem

CI tests for Unity Passport authentication were flaky due to browser process isolation - Unity's Application.OpenURL() opens URLs in separate browser processes that automated testing tools (Selenium) cannot control.

Solution

Implements comprehensive browser automation workarounds:

Core Fixes:

  • Browser Process Isolation Workaround: Monitor Unity logs to capture auth/logout URLs and navigate controlled browser directly
  • Programmatically configure Windows registry for immutablerunner:// protocol
  • Pre-configure browser to allow auth.immutable.com to open external applications
  • Correct API base URL configuration for reliable OTP retrieval
  • Increase AltDriver timeouts for CI stability (20s → 120s)
  • Handle both full login flows and cached session scenarios
  • Implement fallback authentication detection via Unity logs

CI Workflow Fix

  • Serialize UI tests to prevent parallel OTP inbox conflicts
  • Change concurrency group from per-platform to shared email inbox

Customer Impact

Added

Changed

Deprecated

Removed

Fixed

Security

Things worth calling out

Other things to consider:

  • Sample app is updated with new SDK changes
  • Updated public documentation with new SDK changes (Immutable X and Immutable zkEVM)
  • Sample game is updated with new SDK changes
  • Replied to GitHub issues

- Add browser process isolation workaround for Unity Passport authentication
- Configure protocol associations and browser permissions programmatically
- Handle both full login flows and cached session scenarios
- Fix MailSlurp API URL configuration for OTP retrieval
- Implement controlled logout process to prevent app crashes
- Increase AltDriver timeouts for CI stability
- Change concurrency group from per-platform to shared 'ui-tests-email-inbox'
- Ensures macOS and Windows tests run sequentially to avoid MailSlurp race conditions
- Prevents OTP emails being consumed by wrong test when tests run in parallel
- Add cancel-in-progress: false to ui-tests-email-inbox concurrency group
- Allows queued tests to complete rather than being canceled by new runs
- Improves CI resource utilization and debugging experience
- Maintains existing protection against MailSlurp OTP race conditions
nattb8
nattb8 previously approved these changes Aug 19, 2025
@CodeSchwert CodeSchwert mentioned this pull request Aug 19, 2025
4 tasks
@CodeSchwert CodeSchwert merged commit 6a4e655 into main Aug 19, 2025
26 checks passed
@CodeSchwert CodeSchwert deleted the fix/ci-test-automation branch August 19, 2025 06:01
@github-actions github-actions bot added the fix label Aug 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

2 participants