Test your app
Describes unit testing and how to install into test accounts for local testing in Connect Platform for Optimizely Data Platform (ODP).
Connect Platform for Optimizely Data Platform (ODP) app templates include a configuration for Jest, but you can use any unit testing framework as long as you configure it to run using the yarn test
command. Unit tests run automatically before uploads and when building your app to run on Connect Platform for ODP infrastructure. If any tests fail, you cannot publish your app.
Note
Optimizely strongly recommends coverage minimums.
See the basic template (generated from the ocp app init
command) for examples of how to use unit tests to cover difficult tasks such as a state machine-based job.
Install into test accounts
To ease development and testing, you can install apps into an account from the Connect Platform for ODP command-line interface (CLI), even when they are not visible in the Optimizely Data Platform (ODP) App Directory (for example, development and beta versions).
Use pre-release tags, like -dev
or -beta
, to publish a new version of an app without making it public or automatically upgrading existing installations.
Manually install into test accounts
You can also manually install pre-release apps from the Connect Platform for ODP CLI, using the following command:
ocp directory install [email protected] <tracker_id>
Where <tracker_id>
is the Tracker ID of the ODP account to which you wish to install. When this command completes, your app is installed and ready to go. You can verify the app is installed with the following command:
ocp directory list-installs [email protected]
Manually uninstall an app
To manually uninstall an app from an account, run the following command in the Connect Platform for ODP CLI:
ocp directory uninstall [email protected] <tracker_id>
Updated 8 days ago