End-to-end and Unit Tests
Last updated
Last updated
Before you run any test - end-to-end or backend - you need to configure the .env.test
file.
For safety reasons, the database is not pre-configured there, but you can uncomment the suggested database settings.
The database gets erased on every test scenario! So be careful and use a disposable database.
All the pre-defined features - Authentication, Tenants, Memberships, Subscriptions, API Keys, etc - are fully tested. For the custom entities, the codebase includes template files that you can use to write your own tests. The reason is that because the custom entities can have any form, there is no way to anticipate the scenarios that need to be tested.
The command to run the end-to-end tests is:
This will open the Playwright UI for you to start and watch the tests run.
The command to run the backend tests is: