Testing
Testing is an important part of every application. Each framework may require a slightly different setup. If you're having trouble getting testing to work properly, contact support.
Testing with one time passcodes
To avoid sending an email or SMS message with a one time passcode (OTP) during testing, you can use a fake email address or phone number that has a fixed code. Read the complete documentation here.
Testing Tokens
Testing Tokens allow you to bypass bot detection mechanisms that protect Clerk applications from malicious bots, ensuring your test suites run smoothly. Without Testing Tokens, you may encounter "Bot traffic detected" errors in your requests.
Obtained via the Backend API, Testing Tokens are short-lived and valid only for the specific instance for which they are issued.
Once retrieved, include the token value in the __clerk_testing_token
query parameter in your Frontend API requests. For example, a sign-up request using a Testing Token would look like this:
For more information, feedback or issues, visit the @clerk/testing
package.
Feedback
Last updated on