Skip to content
TestsigmaDOCS

Test Data

MailboxAliasFunctions Function Type

Prerequisites

Before you begin, ensure that you have referred to:


Selecting MailboxAliasFunctions as a Function Type for Data Generator

Section titled “Selecting MailboxAliasFunctions as a Function Type for Data Generator”
  1. From the left navigation bar, go to Create Tests > Test Cases and create a new test case. Test Cases

  2. Use NLP to create a new step in the test case and include a placeholder for test data. NLP

  3. Click on the test data placeholder. From the Test Data Types dropdown menu, select the ! Data Generator option. Data Generators

  4. On the ! Data Generators overlay screen, select the Type to Default. This will enable you to use a collection of built-in test data generators. Default

  5. Select MailboxAliasFunctions from the Function Type dropdown list. select mailboxaliasfunctions function type from data generators


  • Allows you to create a unique mailbox alias associated with your primary email account.
  • Each alias creates a unique mailbox address, allowing multiple mailboxes to be directed to the same inbox for testing and automation.
ℹ️Example:
Input Output
Selected MailBox mailboxalias123@example.com
Selected MailBox user1alias456@example.com
Selected MailBox testuseralias789@example.com
Selected MailBox demoalias101@example.com

  • Enables you to retrieve the entire content of an email in a variable. It fetches the body content of an email dynamically during test execution.
ℹ️Example:
Input Output
Runtime Variable: inbox
Timeout: 30
Hello! This is the content of your email.
Runtime Variable: promotions
Timeout: 30
Get 50% off on your next purchase.
Runtime Variable: updates
Timeout: 30
Your order has been shipped.
Runtime Variable: spam
Timeout: 30
Congratulations! You've won a prize.

  • Allows you to retrieve the subject of an email in a variable. It is used to capture email subjects dynamically during test execution.
ℹ️Example:
Input Output
Runtime Variable: inbox
Timeout: 30
Your Order Confirmation
Runtime Variable: promotions
Timeout: 30
Special Offer Just for You
Runtime Variable: updates
Timeout: 30
Account Verification Required
Runtime Variable: spam
Timeout: 30
You've Been Selected!

  • Enables you to extract the OTP sent to the mailbox into a variable based on a regex pattern.
ℹ️Example:
Input Output
Regex: \d{6}
Runtime Variable: inbox,
Timeout: 30
123456
Regex: \d{4}
Runtime Variable: inbox
Timeout: 30
7890
Regex: \d{5}
Runtime Variable: promotions
Timeout: 30
54321
Regex: \d{6}
Runtime Variable: updates
Timeout: 30
654321

  • Allows you to extract a URL containing specific text from the email.
ℹ️Example:
Input Output
Text: Verify
Runtime Variable: inbox
Timeout: 30
https://example.com/verify
Text: Confirm
Runtime Variable: promotions
Timeout: 30
https://example.com/confirm
Text: Reset
Runtime Variable: updates
Timeout: 30
https://example.com/reset
Text: Activate
Runtime Variable: spam
Timeout: 30
https://example.com/activate

  • Enables you to extract a URL containing specific parameters from the email.
ℹ️Example:
Input Output
Substring: verify
Runtime Variable: inbox
Timeout: 30
https://example.com/verify
Substring: confirm
Runtime Variable: promotions
Timeout: 30
https://example.com/confirm
Substring: reset
Runtime Variable: updates
Timeout: 30
https://example.com/reset
Substring: activate
Runtime Variable: spam
Timeout: 30
https://example.com/activate

  • Allows you to extract a URL from the email that matches a specific regex pattern.
ℹ️Example:
Input Output
Regex: r'https://\w+\.com/\w+'
Runtime Variable: inbox
Timeout: 30
https://example.com/verify
Regex: r'https://\w+\.com/\w+'
Runtime Variable: promotions
Timeoutv: 30
https://promo.com/deal
Regex: r'https://\w+\.com/\w+'
Runtime Variable: updates
Timeout: 30
https://updates.com/info
Regex: r'https://\w+\.com/\w+'
Runtime Variable: spam
Timeout: 30
https://spam.com/win

  • Enables you to extract the sender’s email address from an email for testing purposes.
ℹ️Example:
Input Output
Runtime Variable: inbox
Timeout: 30
sender@example.com
Runtime Variable: promotions
Timeout: 30
promo@example.com
Runtime Variable: updates
Timeout: 30
updates@example.com
Runtime Variable: spam
Timeout: 30
spam@example.com

  • Allows you to extract the sender’s name from an email for testing purposes.
ℹ️Example:
Input Output
Runtime Variable: inbox
Timeout: 30
John Doe
Runtime Variable: promotions
Timeout: 30
Promo Sender
Runtime Variable: updates
Timeout: 30
Update Sender
Runtime Variable: spam
Timeout: 30
Spam Sender