Testing guide
This guide explains how to run the iOS test suite for the AliasVault mobile app.
Overview
The iOS app has one test target: VaultStoreKitTests, the unit tests for the native VaultStoreKit framework.
Prerequisites
- macOS with Xcode installed (15.0+)
- iOS Simulator configured
- Node.js 20+
- CocoaPods dependencies installed (
cd apps/mobile-app && npx pod-install)
Running Tests
Via Xcode
-
Open the project in Xcode:
cd apps/mobile-app/iosopen AliasVault.xcworkspace -
Select a simulator (e.g., iPhone 17 Pro)
-
Run tests:
- All tests:
Cmd + Uor Product > Test - Specific test class: Click the diamond icon next to the test class in the Test Navigator
- Single test: Click the diamond icon next to a specific test method
- All tests:
Via Command Line (xcodebuild)
cd apps/mobile-app/ios
# Run all tests on iPhone 17 Pro simulator
xcodebuild test \
-workspace AliasVault.xcworkspace \
-scheme AliasVault \
-destination 'platform=iOS Simulator,name=iPhone 17 Pro' \
-only-testing:VaultStoreKitTests \
-resultBundlePath ./test-results
List Available Simulators
xcrun simctl list devices available