This is a simple Clerk+Next.js application showing how you can run e2e Cypress tests for your application using testing tokens.
https://clerk.com/docs/testing/cypress
- Sign up for a Clerk account at https://clerk.com.
- Go to Clerk's dashboard and create an application.
- Set the required Clerk environment variables as shown in the example env file.
npm install
the required dependencies.npm run dev
to launch the development server.
- Create a test account using Clerk Dashboard or by signing up on the application.
- Copy the
cypress.env.example.json
file tocypress.env.json
.
cp cypress.env.example.json cypress.env.json
- Set
test_user
andtest_password
to the credentials of the test account. - Open Cypress while keeps the development server running:
npm run cypress:open
- Navigate through cypress and run the tests
e2e testing -> chrome -> start e2e testing in chrome
If you are running NOT running on localhost:3000
, you will need to update the baseUrl
in cypress.config.ts
to match your development server's URL.