This repository holds the code to run integration tests for Session iOS and Android.
- Node.js 24.12.0
- pnpm 10.28.1
- Git LFS
pnpm install --frozen-lockfile
git lfs install && git lfs pull
git submodule update --init --recursivepnpm start-server # Starts Appium server
pnpm test # Run all tests
pnpm test-android # Android tests only
pnpm test-ios # iOS tests only
pnpm test-one 'Test name' # Run specific test (both platforms)
pnpm test-one 'Test name @android' # Run specific test on one platformFor CI setup and codebase overview, see ARCHITECTURE.md.
Note: The tests use devices with specific resolutions for visual regression testing - ensure you have these available (see below).
Prerequisites: Android Studio installed with SDK tools available
- Create 4x Pixel 6 emulators via AVD Manager (minimum 4 emulators - tests require up to 4 devices simultaneously)
- Recommended system image is Android API 34 with Google Play services
- Emulator names are not significant. The tests discover running emulators automatically.
- Configure the emulators' virtual scene to enable custom image injection to camera viewport
pnpm setup-virtual-scene
- Download Session binaries from the build repository
- Choose the appropriate binary based on your network access:
- QA: Pre-configured to mainnet, can run on any network
- AutomaticQA: Pre-configured to a local devnet, must have access
- Choose the appropriate binary based on your network access:
- Set environment variable:
# In your .env file ANDROID_APK=/path/to/session-android.apk - Start emulators manually - they need to be running before tests start (Appium won't launch them automatically)
emulator @<your-emulator-name>
Prerequisites: Xcode installed and the appropriate simulator runtime available - check in scripts/create_ios_simulators.ts
-
Create iOS simulators with preloaded media attachments:
# Local development (create 4 simulators to be able to run all tests) pnpm create-simulators 4 # Or specify custom count pnpm create-simulators <number>
-
Download Session binaries from the the build repository
-
Extract .app file and copy Session.app to an easily accessible location
-
Set environment variable:
# In your .env file IOS_APP_PATH_PREFIX=/path/to/Session.app
cp .env.sample .envRequired paths:
ANDROID_SDK_ROOT=/path/to/Android/Sdk # SDK tools auto-discovered from here
ANDROID_APK=/path/to/session-android.apk # Android APK for testing
IOS_APP_PATH_PREFIX=/path/to/Session.app # iOS app for testingTest configuration:
_TESTING=1 # Skip printing appium/wdio logs
PLAYWRIGHT_RETRIES_COUNT=0 # Test retry attempts
PLAYWRIGHT_REPEAT_COUNT=0 # Successful test repeat count
PLAYWRIGHT_WORKERS_COUNT=1 # Parallel test workers
CI=0 # Set to 1 to simulate CI (mostly for Allure reporting)
ALLURE_ENABLED=false # Set to 'true' to generate Allure reports (in conjunction with CI=1)
UPDATE_BASELINES=true # Auto-save new screenshot baselines if unavailable
SOGS_ADMIN_SEED='word1 word2...' # 13-word recovery phrase of an account that's an admin in the testing SOGS.