Skip to content

Commit ba75b4e

Browse files
committed
docs: add ui logging requirements
1 parent e74e1be commit ba75b4e

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed

sample/Tests/README.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# UI Tests
2+
3+
## Prerequisites
4+
5+
### Passport SDK Log Level Configuration
6+
7+
For the authentication flow tests to work properly, the Passport SDK must be configured with an appropriate log level that enables auth URL capture. The test automation relies on capturing authentication URLs from Unity's Player.log.
8+
9+
**Required Configuration:**
10+
11+
In your Unity project's Passport initialisation script, ensure the log level is set to `Info` or `Debug`:
12+
13+
**File:** `src/Packages/Passport/Runtime/Scripts/Passport/PassportInitialisation/PassportInitialisationScript.cs`
14+
15+
```csharp
16+
// Set the log level for the SDK (required for test automation)
17+
Passport.LogLevel = LogLevel.Info; // or LogLevel.Debug
18+
```
19+
20+
**Why This Is Required:**
21+
22+
- The test framework captures authentication URLs from Unity logs using `PassportLogger.Info()` calls
23+
- Without proper logging, authentication URL interception will fail
24+
- This enables the workaround for browser process isolation issues in automated testing environments
25+
26+
**Log Patterns Captured:**
27+
28+
The tests monitor Unity's `Player.log` for these patterns:
29+
30+
- `[Immutable] PASSPORT_AUTH_URL: <url>`
31+
- `[Immutable] [Browser Communications Manager] LaunchAuthURL : <url>`
32+
33+
If authentication tests fail to capture URLs, verify that:
34+
35+
1. The Passport SDK log level is set correctly
36+
2. Unity's Player.log is being written to the expected location
37+
3. The authentication flow is actually being triggered

sample/Tests/test/test_windows.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
"""
2+
Unity Passport Windows UI Tests
3+
4+
For test setup and configuration requirements (especially Passport SDK log level),
5+
see: sample/Tests/README.md
6+
7+
These tests require proper authentication URL logging to work correctly.
8+
"""
9+
110
import time
211

312
from alttester import *

0 commit comments

Comments
 (0)