Turn your manual testers into automation experts! Request a DemoStart testRigor Free

How to do email testing using testRigor?

Emails are a part of many workflows and might come up frequently when performing end-to-end testing. Here’s a detailed how-to guide for you to test emails using testRigor.

Let us take the example of a sample e-commerce web application. We will use this app and create a test case in testRigor using plain English test steps. Let’s get started.

Pre-requisites to writing the test case

Step 1: Log in to your testRigor app with your credentials.

Step 2: Set up the test suite for testing by providing the information below:

  • Test Suite Name: Provide a relevant and self-explanatory name.
  • Type of testing: Select from the following options: Desktop Web Testing, Mobile Web Testing, Native and Hybrid Mobile, based on your test requirements. In this case, we will go with Desktop Web Testing.
  • URL to run test on: Provide the application URL that you want to test.
  • Testing credentials for your web/mobile app to test functionality which requires user to login: You can provide the app’s user login credentials here and need not write them separately in the test steps then. The login functionality will be taken care of automatically using the keyword login. However, this is an optional field and can be skipped if not relevant.
  • OS and Browser: Choose the OS Browser combination on which you want to run the test cases.
  • Number of test cases to generate using AI: You can simplify your test creation further by opting to generate test cases based on the App Description text. This feature works on generative AI.

This is how the test suite creation screen will look like

Step 3: Click on Create Test Suite.

On the next screen, you can let AI generate the test case based on the App Description you provided during the Test Suite creation. However, for now, select do not generate any test, since we will write the test steps ourselves.

Step 4: To create a new custom test case yourself, click Add Custom Test Case.

Test Case: Register on a website and check the confirmation email

In this test case, we will go to an e-commerce website and create an account, providing the required information. Once this is done, an email will be sent to the email address provided on the website. We will check if the email was received.

Let’s take a look at every step that will be part of the testRigor test case.

Test Steps

Step 1: Come to the Test Cases section, provide the test case Description, and start adding the test steps. We will add test steps in the test case editor screen.

Step 2: Since we provided the website URL during test suite creation, testRigor automatically navigates to this website. There is no need to use a separate function to open the URL.

Step 3: Click on the ‘Create an Account’ option on the homepage.
click "Create an Account"

The ‘Create an Account’ page will look like this.

Step 4: On the ‘Create an Account’ page, fill in the required information like first name, last name, email address, and password. testRigor makes creating random test data super easy through plain English commands.

Steps 5 to 7 explain this process in detail.

Step 5: Generate a unique email address and save it in a parameter called ‘generatedEmail’. Then use this parameter to fill in the ‘Email’ field in registration form.
generate unique email, then enter into "Email" and save as "generatedEmail"

Note: testRigor renders its own virtual mailbox so that the received emails can be seen and interacted with. Hence, the email address you want to use for testing should have the following format: <random-user>@testrigor-mail.com, where <random-user> can be any valid email handle. e.g. [email protected].

For using the ‘send email’ commands, you can use any email address like [email protected]. But if you want to use ‘check email’ commands, the email must be sent to an email address at the domain testrigor-mail.com. This is so that testRigor can access the email to validate and render it.

Step 6: Generate unique first and last names and save them as parameters called ‘generatedFirstName’ and ‘generatedLastName’ respectively. Use these parameters to fill in the ‘First Name’ and ‘Last Name’ fields in the registration form.
generate unique name, then enter into "First Name" and save as "generatedFirstName"
generate unique name, then enter into "Last Name" and save as "generatedLastName"
Step 7: Generate a unique password using the ‘generate email’ function and save it in a parameter called ‘generatedPassowrd’. Then use this parameter to fill in the ‘Password’ and ‘Confirm Password’ fields in the registration form.
generate unique email and save as "generatedPassowrd"
enter stored value "generatedPassowrd" into "Password"
wait for 2 seconds
enter stored value "generatedPassowrd" into "Confirm Password"

We are using the random email generator (generate unique email) since it includes a special character as well, which works well as a password. Alternatively, you can create a password as a ‘hidden’ variable in the ‘Test Data’ section in the following way.

There’s a 2-second wait to allow the website application’s ‘Password’ field to validate the entered password.

Step 8: On filling in the fields shown in Step 4, click the ‘Create an Account’ button. As soon as you do this, the page will show a message, ‘Thank you for registering with Main Website Store’.
click on button "Create an Account" below "Required Fields"
check that page contains "Thank you for registering with Main Website Store"
Step 9: Clicking the ‘Create an Account’ button will send an email to the email address stored in ‘generatedEmail’. Add a small wait time just to ensure that the email is triggered and received in the mailbox. Use testRigor’s email validation to check the sender’s email address and whether the email has been delivered to the receiver’s email address (saved as generatedEmail).
wait for 20 seconds
check that email from "[email protected]" to saved value "generatedEmail" was received
Step 10: By default, testRigor opens each mail in a different browser tab. To go back to the website application, you need to switch tabs.
switch to tab 1

Step 11: To check if we have come to the correct tab, you can verify some UI elements of the website. For now, you can check if the website contains the randomly generated email address saved as ‘generatedEmail’ under the ‘Contact Information’ section.

check that page contains stored values “generatedEmail” roughly below “Contact Information”

Complete Test Case

Here’s what the complete test case will look like.
click "Create an Account"
generate unique email, then enter into "Email" and save as "generatedEmail"
generate unique name, then enter into "First Name" and save as "generatedFirstName"
generate unique name, then enter into "Last Name" and save as "generatedLastName"
generate unique email and save as "generatedPassowrd"
enter stored value "generatedPassowrd" into "Password"
wait for 2 seconds
enter stored value "generatedPassowrd" into "Confirm Password"
click on button "Create an Account" below "Required Fields"
check that page contains "Thank you for registering with Main Website Store"
wait for 20 seconds
check that email from "[email protected]" to saved value "generatedEmail" was received
switch to tab 1
check that page contains stored values "generatedEmail" roughly below "Contact Information"

Viewing Test Results

Once the test is executed, you can view the execution details, such as execution status, time spent in execution, screenshots, error messages, logs, video recordings of the test execution, etc. Logs and error text are available easily in case of any failure in a few clicks.

You can also download the complete execution with steps and screenshots in PDF or Word format through the View Execution option.

testRigor’s Capabilities

The test case we saw in the above sections is an end-to-end test case where emails are part of the workflow. Apart from the simplistic test case design and execution, you can do much more with testRigor using simple English commands.

  • Email, Phone Call, and SMS Testing: Use simple English commands to test the email, phone calls, and SMS. These commands help validate 2FA scenarios, with OTPs and authentication codes being sent via email, phone calls, or via phone text.
  • Reusable Rules (Subroutines): You can easily create functions for the test steps that you use repeatedly. You can use the Reusable Rules to create such functions and call them in test cases by simply writing their names. See the example of Reusable Rules.
  • Global Variables and Data Sets: You can import data from external files or create your own global variables and data sets in testRigor to use them in data-driven testing.
  • 2FA, QR Code, and Captcha Resolution: testRigor efficiently manages the 2FA, QR Code, and Captcha resolution through its simple English commands.
  • File Upload/ Download Testing: Execute the test steps involving file download or file upload without the requirement of any third-party software. You can also validate the contents of the files using testRigor’s simple English commands.
  • Database Testing: Execute database queries and validate the results fetched.

testRigor enables you to test web, mobile (hybrid, native), API, and desktop apps with minimum effort and maintenance.

Additional Resources

You're 15 Minutes Away From Automated Test Maintenance and Fewer Bugs in Production
Simply fill out your information and create your first test suite in seconds, with AI to help you do it easily and quickly.
Achieve More Than 90% Test Automation
Step by Step Walkthroughs and Help
14 Day Free Trial, Cancel Anytime
“We spent so much time on maintenance when using Selenium, and we spend nearly zero time with maintenance using testRigor.”
Keith Powe VP Of Engineering - IDT
Related Articles

All-Inclusive Guide to Test Case Creation in testRigor

Test cases fuel test automation tools. Over the years, the process of automating these test cases has undergone many changes. ...

How to Create Tests Using Live Mode in testRigor?

testRigor offers a unique capability known as the ‘Live Mode‘ to create and validate test cases. Using it, you can ...

CI/CD Series: testRigor and Azure DevOps

TestRigor manages different types of CI/CD tools in order to enhance with AI your workflows and pipelines. This time, we’ll ...
On our website, we utilize cookies to ensure that your browsing experience is tailored to your preferences and needs. By clicking "Accept," you agree to the use of all cookies. Learn more.
Cookie settings
Privacy Overview
This site utilizes cookies to enhance your browsing experience. Among these, essential cookies are stored on your browser as they are necessary for ...
Read more
Strictly Necessary CookiesAlways Enabled
Essential cookies are crucial for the proper functioning and security of the website.
Non-NecessaryEnabled
Cookies that are not essential for the website's functionality but are employed to gather additional data. You can choose to opt out by using this toggle switch. These cookies gather data for analytics and performance tracking purposes.