π§ͺ Testing
Testing Commandsβ
Select a testing command based on your needs:
- Local Builds
- Expo Cloud Builds
- Expo Update
Features
- β Tests builds stored locally
- β οΈ Requires new builds for each test run
Requirements
- Define paths to π¦ Preview Simulator 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 local-builds
Features
- β Tests builds after completion on EAS servers
- β οΈ Requires new builds for each test run
Requirements
- Use EAS Build to create π¦ Preview Simulator Builds remotely on EAS 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 Simulator 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 EAS servers:
Automatic EAS Build
Start Sherlo and automatically trigger the EAS build using a script from your
package.json
:Terminalnpx sherlo expo-cloud-builds --easBuildScriptName <name>
Manual EAS Build
Start Sherlo and then manually trigger the EAS build command:
Terminalnpx sherlo expo-cloud-builds --waitForEasBuild
The --profile
option in EAS build command must match the one in eas-build-on-complete
script
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 Simulator 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 expo-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>
Common Optionsβ
These options work with any testing command:
Option | Value | Default | Description |
---|---|---|---|
--token | <token> | Authentication token for the project | |
--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
Running Testsβ
Before running your tests, make sure you have:
- βοΈ completed the π§© Integration
- βοΈ created the π Config file
- βοΈ created the π¦ Builds (or set up EAS build command for π§ͺ Expo Cloud Builds)
Now run your chosen π§ͺ Testing Command and start testing!
Results Reviewβ
Once the tests are complete, you can review the results in the Sherlo web application
And that's it! π
Enjoy testing with Sherlo π₯³
