#3 Testing Registration
In this tutorial, we create a trace for a crucial part of customer onboarding - the registration. First, we register a new user with a randomized email address. We then verify their account by opening a registration email, click a verification link, and check that we are logged in with our random user.
Creating random (runtime generated) test users to avoid database reset
Testing that users receive emails
Checking that specific content is present in the email
1. Navigate to Registration Form
Start in the Editor with http://testsite.usetrace.com as the Base URL. Click “REGISTER” on the website.
2. Random Email Address
We are now on the registration form. Enter “firstname.lastname@example.org” in the email field, where you replace “myuniquestring” with a unique string of characters that no one else is likely to use. One account in Usetrace’s mailbox (mail.usetrace.com) can hold one message which is deleted once it is opened. Using your unique string of characters makes sure no one else uses the same addresses as you, which could possibly delete your emails.
Usetrace automatically replaces the word “random” in the email address with a randomized number each time the trace is run. This creates new accounts which can receive your registration email (Random text for examples).
Also, type “random” in the username field to automatically generate new users. Click register.
3. Open Registration Email
Now that we’ve created a new user account, we continue the onboarding by opening a registration email. To open the random user’s mailbox, select other steps and then click the email icon from the available Pointer options in the Editor.
Usetrace automatically suggests opening the mailbox of the “mail.usetrace.com” address which we created earlier. Click “open email”.
4. Click Verification Link In Email
Usetrace opens the registration email in its internal webmail client. Click the link in the email to make sure that users can finish onboarding and land on your website.
5. Add Check for Successful Registration
The link takes us back to the website where we registered. To check that the user has successfully been registered, select the Check tool on the left-hand side of the Editor, and click “logged in as” to complete the user path.
6. Run Trace
(1) Run the registration trace
(2) Check that it passes successfully (meaning that users are able to register)
(3) See the randomly generated email address
(4) See the randomly generated username
7. Rename Trace
Change the name of the trace to “Registration”.
We have now completed a trace that tests registration with email verification. We learned to create new random users, open emails coming from our website, and verify that appropriate content is shown on the website.