Comment on page
Set up Outlook for tests
Test case: as a user, I go to the homepage and click "sign up" button. I enter my email and password. I receive a verification email. I click the link. I use previous email and password to log in.
We're going to use variables to solve a number of problems
- How to get a unique random email address
- How to receive the email with the authorization link
- How to use previously generated unique email and password in the login form
Your emails may be at first classified as "junk mail", but later Outlook may just put them in your inbox and organize them into a conversation. To prevent this unpredictable behavior you need to change a few switches in the Outlook settings
Add BugBug email to safe addresses to prevent junk email classification
Disable the conversation view in Outlook settings
Disable the Focused inbox
Create a new test and start recording. When you're about to enter the registered email address, remember to use the plus aliasing and add a random text after the "+" symbol for example
We're going to replace this suffix later with a variable!
During the recording, open a new tab and access your email inbox. Use your normal email address without the
+12345part in the email log-in form.
Find the email with the authorization link.
Don't forget to check the junk email folder! To prevent that we recommend that you add BugBug email to "safe emails" in Outlook settings.
Important! Make sure you click the subject line of the email! BugBug needs to always open the most recent email, so your selector here needs to click the first email with a specific subject line, for example
//SPAN[normalize-space(text())="Finish your sign-up
Now just click the Button with the authorization link and continue recording.
Now finish the recording. We now need to replace the recorded texts with variables manually.
If you run the test without using variables, it will fail because you will get a validation "This email already exists".
We need to have a unique email address every time we run this test.
Every time you run the test, you will see that a new unique email address is typed in the registration and login fields.
You will see a computed value in the step details.
Computed value will appear below the field after a test run