Generative AI-Based Testing Certification
Dealing with Emails
testRigor supports sending, receiving, and validating emails. You can send emails to any domain, but built-in email validations require the recipient to use @testrigor-mail.com.
Email Workflow
[email protected].send email to "[email protected]" with subject "Test" and body "Hi, this is a test"
check that email from "[email protected]" is delivered
send email from "[email protected]" to "[email protected]" with subject "Test" and body "Hi, this is a test"Unique Email Generation
generate unique email and save it as "newEmail"
generate from template "*********@testrigor-mail.com" and save it as "newEmail"
save string with parameters "username${nowUnixTime}@testrigor-mail.com" as "newEmail"
Email Validation
check that email to saved value "newEmail" was received
check that email to saved value "newEmail" from "[email protected]" and "Confirm" in subject was received
check that email to saved value "newEmail" and "<regular expression>" in subject was received
check that one or more emails to "[email protected]" and "Confirm" in subject were delivered
check that two emails to "[email protected]" and "Confirm" in subject were delivered
If multiple emails match a validation that expects only one, testRigor will report an error, but each email will still open in a separate tab. You can switch between them using switch to tab "1", switch to tab "2", etc. The original webpage will remain in its existing tab, usually tab “1”, unless additional tabs were opened beforehand.
check that email from "[email protected]" was not delivered
Email attachments and saved values
send email from "senderEmail" to "recepientEmail" with subject "Test", and body "Hi, this is a test", and attachment from saved value "Sample File"
send email from "[email protected]" to "[email protected]" with subject "Test", and body "Hi, this is a test", and attachment "http://online.com/file/name.pdf"
Rendering and Interacting with Emails
Since emails are rendered as HTML pages, you can interact with and validate their contents using regular testRigor commands.
check "message-subject" contains "Test"
Useful email element IDs include:
“message-froms” – a list of “From” addresses (usually one address)
“message-subject” – subject line
“message-date” – message sent date and time in Pacific Time zone.
“message-tos” – a list of “To” addresses
“message-ccs” – a list of “CC” addresses
“message-bccs” – a list of “BCC” addresses
“message-reply-to” – “Reply To” address
“message-text” – the message text
“message-attachments” – a list of attachments (file names only)
If multiple emails are rendered, each opens in a separate tab. You can switch between them using:
switch to tab "1"
switch to tab "2"
Rendering emails on mobile devices
check that email to "[email protected]" and "Confirm" in subject was received and show in mobile
Notes:
-
The wait time in which the email is expected to arrive can be adjusted in
Settings->Speed optimizations->Timeouts and delays->Email maximum wait time, seconds:. -
An email can be sent to multiple recipients by adding “and”:
send email to saved value "newEmail" and saved value "newEmail_2" with subject "Test" and body "Hi" - All messages sent to @testrigor-mail.com will be deleted after 24 hours, whether checked or not.



