Turn your manual testers into automation experts!Request a Demo

How to Use Built-in Reusable Rules in testRigor

Weekly Newsletter
Receive weekly testRigor newsletters packed with insights on test automation, codeless testing, and the latest advancements in AI.

testRigor provides several built-in reusable rules for common actions such as logging in, signing up, logging out, and selecting dates. These rules simplify test creation by handling common workflows without requiring you to write every individual step.

In this article, we’ll cover the following built-in rules:

  1. login – Log into an application using configured or stored credentials.
  2. sign up – Register a new account with automatically generated credentials.
  3. logout – Sign out of an application.
  4. pick – Select individual dates or date ranges.

Login

The built-in login rule automatically logs into your application using the credentials configured under Settings → Authentication → App-specific Authentication.

login

Alternatively, you can define the stored values username and password in your Test Data to override the default authentication credentials.

You can also explicitly specify which stored values to use:

login with stored value "newEmail" and stored value "newPassword"

Unlike the signup rule, the login rule does not generate new credentials. It uses the credentials provided to it.

You can also override the default credentials by assigning new values to username and password:

save "[email protected]" as "username"
save "SecurePassword123!" as "password"
login

Or provide the credentials directly:

login with username "[email protected]" and password "SecurePassword123!"

Signup

The built-in sign up rule automatically generates and saves the following stored values during registration:

Note: The rule first looks for a sign-up button to click, so make sure you’re on a page where the sign-up option is available.

generate unique email and save it as "newEmail"
generate by regex "[a-z0-9]{18}!" and save it as "newPassword"
save "James" as "user_name"
save "Gatsby" as "user_last_name"

These stored values are generated or assigned when the sign up rule executes. Any existing values with the same names will be overwritten.

Reusing Signup Credentials

Once registration is complete, you can reuse the generated credentials in subsequent test steps:

sign up
enter stored value "newEmail" into "Email"
enter stored value "newPassword" into "Password"
click "Sign In"

Alternatively, you can pass these stored values directly to the built-in login rule:

sign up
login with stored value "newEmail" and stored value "newPassword"

Logout

The built-in logout rule automatically looks for a logout button and clicks it to sign out of the application.

login with stored value "newEmail" and stored value "newPassword"
logout

Dates

testRigor also provides built-in rules for selecting individual dates and date ranges.

pick "mm/dd/yyyy" from "element"
pick dates from "mm/dd/yyyy" to "mm/dd/yyyy"
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

How to Test Passkey Logins with testRigor

How to test login to Salesforce testRigor can now log in with a passkey, so tests are no longer blocked when a site asks for one. ...
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.