Skip to content

xmtp/xmtp-chat-e2e-browser-tests

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

XMTP E2E Tests

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.

What's tested

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.

Prerequisites

  • Node.js >= 20
  • A running xmtp.chat instance (see xmtp-js)

Setup

npm install
npx playwright install chromium

Copy .env.example to .env and set XMTP_E2E_APP_URL to your xmtp.chat instance:

cp .env.example .env

Usage

# 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=50

Configuration

All 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

Memory requirements

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

Output

  • Console: Real-time pass/fail with timing for each test
  • JSON reports: results/test-results-<timestamp>.json with full metrics
  • Screenshots: Diagnostic screenshots per test case in screenshots/<suite>/

About

No description, website, or topics provided.

Resources

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors