Skip to main content

Testing

Convex makes it easy to test your app via automated tests running in JS or against a real backend, and manually in dev, preview and staging environments.

Automated tests

convex-test library

Use the convex-test library to test your functions in JS via the excellent Vitest testing framework.

Testing against a real backend

Convex open source builds allow you to test all of your backend logic running on a real local Convex backend.

Set up testing in CI

It's a good idea to test your app continuously in a controlled environment. No matter which way automated method you use, it's easy to run them with Github Actions.

Manual tests

Running a function in dev

Manually run a function in dev to quickly see if things are working:

Preview deployments

Use preview deployments to get early feedback from your team for your in-progress features.

Staging environment

You can set up a separate project as a staging environment to test against. See Deploying Your App to Production.