Dev Guide
Dev GuideUser GuideGitHubNuGetDevCommunitySubmit a ticketLog In
GitHubNuGetDevCommunitySubmit a ticket

Test your app

Describes unit testing and how to install into test accounts for local testing in Optimizely Connect Platform (OCP).

Optimizely Connect Platform (OCP) 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 OCP 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 on 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 OCP command-line interface (CLI), even when they are not visible in the Optimizely Data Platform (ODP) App directry (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 OCP 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 OCP CLI:

ocp directory uninstall [email protected] <tracker_id>