End-to-end test suite for xmtp.chat against the XMTP D14N staging network.
Uses Playwright to drive real browser sessions with ephemeral wallets — no mocks, no SDK shortcuts. Every test goes through the UI.
45 core tests across 8 suites:
| Suite | Tests | What it covers |
|---|---|---|
| 01 - Connection | 5 | Wallet setup, network selection, XMTP registration |
| 02 - Direct Messages | 5 | DM creation, send, streaming delivery, bidirectional replies |
| 03 - Group Chat | 6 | 5-user group creation, propagation, message delivery |
| 04 - Group Management | 8 | Consent, metadata editing, member add/remove, permissions |
| 05 - Message Types | 8 | Reactions (add/remove/toggle), replies |
| 06 - Identity | 4 | Identity modal, address, inbox ID, installations |
| 07 - Sync | 4 | Sync conversations, sync all, sync request, per-conversation |
| 08 - Advanced Group | 5 | Named groups, image URL, permission enforcement |
Scale tests (parameterized): 10, 25, 50, and 100 concurrent users in a single group.
- Node.js >= 20
- A running xmtp.chat instance (see xmtp-js)
npm install
npx playwright install chromiumCopy .env.example to .env and set XMTP_E2E_APP_URL to your xmtp.chat instance:
cp .env.example .env# Core tests only (suites 01-08)
npm test
# Core + scale tests
npm run test:scale10 # + 10-user group
npm run test:scale25 # + 10, 25-user groups
npm run test:scale50 # + 10, 25, 50-user groups
npm run test:scale100 # + all scale tests
# Scale tests only (skip core)
node src/run.mjs --scale-only=100
# Single scale level only
node src/run.mjs --scale-exact=50All configuration is via environment variables (or .env file):
| Variable | Default | Description |
|---|---|---|
XMTP_E2E_APP_URL |
https://localhost:5173/ |
xmtp.chat instance URL |
XMTP_E2E_NETWORK |
d14n-staging |
Network dropdown selection |
XMTP_E2E_RESULTS_DIR |
./results |
JSON report output |
XMTP_E2E_SCREENSHOTS_DIR |
./screenshots |
Screenshot output |
XMTP_E2E_HEADLESS |
true |
Set false for visible browser |
Each browser context uses ~150-200 MB. Scale tests keep all contexts alive simultaneously.
| Scale | Peak Memory |
|---|---|
| Core (suites 01-08) | ~4 GB |
| 10 users | ~3 GB |
| 25 users | ~6 GB |
| 50 users | ~12 GB |
| 100 users | ~22 GB |
- Console: Real-time pass/fail with timing for each test
- JSON reports:
results/test-results-<timestamp>.jsonwith full metrics - Screenshots: Diagnostic screenshots per test case in
screenshots/<suite>/