Skip to content

Commit d09d95e

Browse files
committed
Update readme
1 parent 4ea1b22 commit d09d95e

File tree

1 file changed

+71
-5
lines changed

1 file changed

+71
-5
lines changed

integration-test/README.md

Lines changed: 71 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,36 @@
22

33
This directory contains integration tests for the Sentry Unreal SDK using Pester (PowerShell testing framework).
44

5+
Supports testing on:
6+
- **Windows** - Desktop (x64)
7+
- **Linux** - Desktop (x64)
8+
- **Android** - Local device/emulator (via adb) or SauceLabs Real Device Cloud
9+
510
## Prerequisites
611

12+
### Common Requirements
13+
714
- **PowerShell 7+** (Core edition)
815
- **CMake 3.20+**
916
- **Pester 5+** - Install with: `Install-Module -Name Pester -Force -SkipPublisherCheck`
1017
- **Pre-built SentryPlayground application** (from local build or CI artifact)
1118
- **Environment variables**:
1219
- `SENTRY_UNREAL_TEST_DSN` - Sentry test project DSN
1320
- `SENTRY_AUTH_TOKEN` - Sentry API authentication token
14-
- `SENTRY_UNREAL_TEST_APP_PATH` - Path to the SentryPlayground executable
21+
- `SENTRY_UNREAL_TEST_APP_PATH` - Path to the SentryPlayground executable/APK
22+
23+
### Android-Specific Requirements
24+
25+
#### Option A: Local Testing (via adb)
26+
- **Android device or emulator** connected and visible via `adb devices`
27+
- **ADB (Android Debug Bridge)** installed and in PATH
28+
29+
#### Option B: Cloud Testing (via SauceLabs)
30+
- **SauceLabs account** with Real Device Cloud access
31+
- **Additional environment variables**:
32+
- `SAUCE_USERNAME` - SauceLabs username
33+
- `SAUCE_ACCESS_KEY` - SauceLabs access key
34+
- `SAUCE_REGION` - SauceLabs region (e.g., `eu-central-1`)
1535

1636
## Setup
1737

@@ -39,6 +59,7 @@ This will:
3959
3. Download the appropriate artifact:
4060
- `UE X.X sample build (Windows)` for Windows testing
4161
- `UE X.X sample build (Linux)` for Linux testing
62+
- `UE X.X sample build (Android)` for Android testing
4263
4. Extract to a known location
4364

4465
#### Option B: Build Locally
@@ -75,11 +96,43 @@ cd integration-test
7596
pwsh -Command "Invoke-Pester Integration.Tests.ps1"
7697
```
7798

99+
### Android (Local via adb)
100+
101+
```bash
102+
# Ensure device/emulator is connected
103+
adb devices
104+
105+
# Set environment variables
106+
export SENTRY_UNREAL_TEST_DSN="https://[email protected]/project"
107+
export SENTRY_AUTH_TOKEN="sntrys_your_token_here"
108+
export SENTRY_UNREAL_TEST_APP_PATH="./path/to/SentryPlayground.apk"
109+
110+
# Run tests
111+
cd integration-test
112+
pwsh -Command "Invoke-Pester Integration.Tests.Android.Adb.ps1"
113+
```
114+
115+
### Android (Cloud via SauceLabs)
116+
117+
```bash
118+
# Set environment variables
119+
export SENTRY_UNREAL_TEST_DSN="https://[email protected]/project"
120+
export SENTRY_AUTH_TOKEN="sntrys_your_token_here"
121+
export SENTRY_UNREAL_TEST_APP_PATH="./path/to/SentryPlayground.apk"
122+
export SAUCE_USERNAME="your-saucelabs-username"
123+
export SAUCE_ACCESS_KEY="your-saucelabs-access-key"
124+
export SAUCE_REGION="eu-central-1"
125+
126+
# Run tests
127+
cd integration-test
128+
pwsh -Command "Invoke-Pester Integration.Tests.Android.SauceLabs.ps1"
129+
```
130+
78131
## Test Coverage
79132

80133
The integration tests cover:
81134

82-
### Crash Capture Tests
135+
### Crash Capture Tests _(Windows/Linux)_
83136
- Application crashes with non-zero exit code
84137
- Event ID is captured from output (set via `test.crash_id` tag)
85138
- Crash event appears in Sentry
@@ -89,8 +142,10 @@ The integration tests cover:
89142
- Integration test tags are set
90143
- Breadcrumbs are collected
91144

92-
### Message Capture Tests
93-
- Application exits cleanly (exit code 0)
145+
**Note**: Crash capture tests are currently disabled on Android due to a known issue with tag persistence across app sessions.
146+
147+
### Message Capture Tests _(All platforms)_
148+
- Application exits cleanly (exit code 0 on Windows/Linux, Android doesn't report exit codes)
94149
- Event ID is captured from output
95150
- TEST_RESULT indicates success
96151
- Message event appears in Sentry
@@ -99,9 +154,13 @@ The integration tests cover:
99154
- Integration test tags are set
100155
- Breadcrumbs are collected
101156

157+
**Note**: On Android, events are captured from the Java layer, so the platform will be `java` instead of `native`.
158+
102159
## Output
103160

104161
Test outputs are saved to `integration-test/output/`:
162+
163+
### Windows/Linux
105164
- `*-crash-stdout.log` - Crash test standard output
106165
- `*-crash-stderr.log` - Crash test standard error
107166
- `*-crash-result.json` - Full crash test result
@@ -110,6 +169,13 @@ Test outputs are saved to `integration-test/output/`:
110169
- `*-message-result.json` - Full message test result
111170
- `event-*.json` - Events fetched from Sentry API
112171

172+
### Android
173+
- `*-logcat.txt` - Logcat output from app execution (one file per launch)
174+
- `event-*.json` - Events fetched from Sentry API
175+
113176
## CI Integration
114177

115-
See `.github/workflows/integration-test-windows.yml` and `.github/workflows/integration-test-linux.yml` for CI usage examples.
178+
See the following workflow files for CI usage examples:
179+
- `.github/workflows/integration-test-windows.yml` - Windows desktop testing
180+
- `.github/workflows/integration-test-linux.yml` - Linux desktop testing
181+
- `.github/workflows/integration-test-android.yml` - Android testing via SauceLabs Real Device Cloud

0 commit comments

Comments
 (0)