๐งช Testing
Test Commandโ
To run tests use this guided testing command:
npx sherlo test
For non-interactive commands, you can run directly:
npx sherlo test:standard
- test standard buildsnpx sherlo test:eas-update
- test builds with dynamic JavaScript (OTA) updatesnpx sherlo test:eas-cloud-build
- test cloud builds created on Expo servers
Testing Methodsโ
Select a testing method based on your needs:
- Standard
- EAS Update
- EAS Cloud Build
Description
Test standard builds with bundled JavaScript code
Features
- โ Tests builds stored locally
- โ ๏ธ Requires new builds for each test run
Requirements
- Define paths to ๐ฆ Preview builds
Options
Option | Value | Description |
---|---|---|
--android | <path> | Path to Android build (.apk ) |
--ios | <path> | Path to iOS build (.app , .tar.gz or .tar ) |
Options --android
and --ios
override ๐ Config properties if are set in both places
Usage
Run Sherlo to test builds stored locally:
npx sherlo test:standard
Description
Test builds with dynamic JavaScript loading through Over-The-Air (OTA) updates via EAS Update
Features
- โ Tests builds stored locally
- โ Requires new builds only when native code changes
Requirements
- Use EAS Update for Over-The-Air updates
- Install
expo
version 51 or higher andexpo-dev-client
Define paths to ๐ฆ Development builds
infoBuilds required only for the first test and when native code changes - Sherlo reuses them otherwise
Options
Option | Value | Description |
---|---|---|
--branch | <branch> | Name of the EAS Update branch to fetch the latest update from |
--android | <path> | Path to Android build (.apk ) |
--ios | <path> | Path to iOS build (.app , .tar.gz or .tar ) |
Options --android
and --ios
override ๐ Config properties if are set in both places
Usage
Run Sherlo to test the latest update from an EAS Update branch:
npx sherlo test:eas-update --branch <branch>
Make sure you've published your latest changes to EAS Update before testing. You can use:
npx eas-cli update --auto --branch <branch>
Description
Test cloud builds created on Expo servers via EAS Build
Features
- โ Tests builds after completion on Expo servers
- โ ๏ธ Requires new builds for each test run
Requirements
- Use EAS Build to create ๐ฆ Preview builds on Expo servers
Add
eas-build-on-complete
script to yourpackage.json
:package.json{
"scripts": {
"eas-build-on-complete": "sherlo eas-build-on-complete --profile <profile>",
// ...
},
// ...
}EAS Build ProfileThe
--profile
option must:- Point to the EAS build profile that creates ๐ฆ Preview builds
- Match the
--profile
option used in your EAS build command
Options
Option | Value | Description |
---|---|---|
--easBuildScriptName | <name> | Name of the package.json script that triggers EAS build |
--waitForEasBuild | Start waiting for EAS build to be triggered manually |
Usage
Run Sherlo to test builds after completion on Expo servers:
Automatic EAS Build
Start Sherlo and automatically trigger the EAS build using a script from your
package.json
:Terminalnpx sherlo test:eas-cloud-build --easBuildScriptName <name>
Manual EAS Build
Start Sherlo and then manually trigger the EAS build command:
Terminalnpx sherlo test:eas-cloud-build --waitForEasBuild
The --profile
option in EAS build command must match the one in eas-build-on-complete
script
Common Optionsโ
These options work with any testing command:
Option | Value | Default | Description |
---|---|---|---|
--token | <token> | Authentication token for the project | |
--message | <message> | Custom message to label the test | |
--config | <path> | sherlo.config.json | Path to the config file |
--projectRoot | <path> | . | Path to the root directory of your project |
Option --token
overrides ๐ Config property if is set in both places
Results Reviewโ
Once the tests are complete, you can review the results in the Sherlo web application
Enjoy testing with Sherlo! ๐ฅณ