How do I test an email activation flow?
Test sign-up and login flows that send a confirmation code or activation link. Your test uses its own Qate test address and reads the confirmation when it arrives.
Before you start
Test email must be enabled in your Qate environment. These steps require an updated CLI or desktop agent when you run tests there. Creating a test address does not register an account in the application you are testing.
Four steps, including the email
- Prepare an address. Add a Test email address action. Choose a new address for registration, or a saved address for an existing account. Keep a new address if you want to use that account again.
- Request the confirmation. Fill the email field with {{testEmail.address}} and submit the form. For an API, use the same placeholder in the request that sends the confirmation email.
- Read the confirmation email. Add Read confirmation email after submission. Choose a code or a link. For a link, enter the expected website host, such as app.example.com. Sender and subject filters help identify the right message.
- Finish verification. Fill the code field with {{testEmail.code}}, or navigate to {{testEmail.link}}. Add an assertion that checks the account is activated or the user is logged in.
Worked example: activate a registration
In your sample app, register with a fresh Qate address. Filter for messages from accounts@example.com with the subject Activate your account and set a 60-second wait. Replace these example values with the ones your application sends.
For an activation link, require app.example.com as the destination host. Open the link and check that the account status is Active. For a code, enter the received code and verify the same outcome.
Watch both registration flowsUse placeholders in your saved test
| Value | Placeholder |
|---|---|
| Test email address | {{testEmail.address}} |
| Verification code | {{testEmail.code}} |
| Activation link | {{testEmail.link}} |
The actual code or link is filled in during execution. Do not paste a one-time code into the saved test. Screenshots and recordings can be omitted during email verification to protect these values.
Use the same account again
In authentication roles, choose or create a saved test address. Register that account in your application once, then reuse its address for later logins. Prepare the address before each new confirmation request.
For REST and SOAP, add the email steps to a custom authentication flow. Read the confirmation, then finish the login request and use its authentication outputs for the protected request.
When an email does not arrive
Check that your application sent the message to the exact test address. The wait limit is adjustable up to 120 seconds. Codes must contain 4 to 10 digits; the email must contain one distinct matching code or link. Check the sender, subject and expected host if no match is found.
One address can handle one verification at a time. Use separate saved addresses for concurrent logins. Qate test addresses receive mail in a dedicated test inbox; you do not need to connect a personal or business mailbox. Your application must accept addresses containing a plus sign.