Skip to main content

🔍 4. Testing

Sherlo Script

To run tests with Sherlo, add the sherlo script to your package.json.

Based on your builds type, select the appropriate script:

If you work with locally available builds, simply add the Sherlo script:

package.json
{
"scripts": {
"sherlo": "sherlo",
// ...
},
// ...
}

Supported Flags

The sherlo script supports the following flags:

FlagTypeDefaultDescription
--token<string>undefinedproject token
--android<path>undefinedAndroid build path
--ios<path>undefinediOS build path
--config<path>sherlo.config.jsonconfig file path
--projectRoot<path>.root of the React Native project
--remoteExpo--runs Sherlo in remote Expo mode, waiting for manual build initiation
--remoteExpoBuildScript<scriptName>undefinedruns Sherlo in remote Expo mode, automatically initiating build
note

Flags --token, --android, and --ios replace config file properties and take priority if both are defined.

Run Tests

If you have completed the setup, prepared builds, created a config file, and added the Sherlo script, you are ready to start testing.

To run tests, execute the Sherlo script:

npm run sherlo

Review Results

Once the tests are complete, you can review the results in the Sherlo web application.

And that's it! 🎉
Enjoy testing with Sherlo 🥳

Party dance