Skip to content
πŸ†• Open SaaS is now running on Wasp v0.15!
βš™οΈ
If you're running an older version and would like to upgrade, please follow the migration instructions.

Tests

This guide will show you how to use the included end-to-end (e2e) tests for your Open SaaS application.

The Tests Directory

In the root of your project, you’ll find an e2e-tests directory which contains the Playwright tests for your Open SaaS application.:

.
β”œβ”€β”€ e2e-tests/
β”‚ β”œβ”€β”€ tests/ # Directory containing the test files
β”‚ β”œβ”€β”€ README.md # Instructions on how to run the tests
β”‚ β”œβ”€β”€ ci-start-app-and-db.js # Script to start the app and db for CI
β”‚ β”œβ”€β”€ playwright.config.ts # Playwright configuration
β”‚ β”œβ”€β”€ package.json
β”‚ β”œβ”€β”€ ...

To run the tests locally, or in a CI pipeline, follow the instructions in the README.md file in the e2e-tests directory.

Using Tests in CI with GitHub Actions

Although the Open SaaS template does not come with an example workflow, you can find one at .github/workflows/e2e-tests.yml of the remote repo.

You can copy and paste the .github/ directory containing the e2e-tests.yml workflow into the root of your own repository to run the tests as part of your CI pipeline.

In order for these tests to run correctly on GitHub, you need to provide the environment variables mentioned in the e2e-tests.yml file within your GitHub repository’s β€œActions” secrets so that they can be accessed by the tests.