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

How to do mobile testing using testRigor?

The popularity of mobile apps these days warrants the need for mobile testing. With testRigor, you can easily test your web-based, native, and hybrid mobile apps.

In this post, we will see mobile testing for two types of apps: native mobile app testing and web-based mobile testing.

Let’s get started.

Create a test suite in testRigor

First and foremost, you need to create a test suite based on the type of testing you intend to do. For that, follow these steps:

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

Step 2: Set up the test suite 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. As soon as you select the option Native and Hybrid Mobile or Mobile Web Testing under the Type of testing section, you will see some new fields.
  • Provider: Here, you need to choose the required provider of mobile testing services like device farms.
  • URL to run test on: Provide the application URL that you want to test. It is not applicable for testing types Native and Hybrid Mobile.
  • 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.
  • Device: You can choose from a host of devices to run your tests on. This setting is applicable only for mobile testing.
  • 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.
  • Upload file: This is exclusive to Native and Hybrid Mobile testing. testRigor uses the .apk or .aab file that you provide here to run your test cases.

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.

Here’s what the test suite looks like in testRigor.

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

Test Scenario 1: Testing a native mobile app

The .apk file used for this demo is a sample application comprising different UI operations that can be tested, like scrolling, interacting with checkboxes, etc. Here’s what the application looks like.

There are three examples in this test suite. Let’s take a look at each of these test cases.

Test Case 1: User can interact with different mobile UI elements

Step 1: Return to the Test Cases section. Provide the test case Description and start adding the test steps.

Step 2: Since the mobile app’s .sdk file is available for testRigor to run test suites on, it will directly open the home page for you. You can see the ‘Views’ option over here; click it. You can write the test steps in plain English using testRigor:
click on "Views"
Step 3: Now, go to ‘Controls’ using testRigor’s plain English command:
click on "Controls"
Step 4: Similarly choose ‘Holo Dark Theme’ from all the theme options.
click on "Holo Dark Theme"

Step 5: On the next screen, you’ll see many UI elements. Interact with these UI elements in the following sequence.

  • Enter text into a text field
  • Select checkboxes
  • Select radiobuttons
  • Select an option from a list
  • Scroll to the bottom of the screen till the expected text is visible
testRigor test steps for these actions are:
enter "This is to verify mobile testing" into "hint text"
click checkbox "Checkbox 1"
click checkbox "Checkbox 2"
click radiobutton "RadioButton 1"
click radiobutton "RadioButton 2"
check that radiobutton "RadioButton 1" is not selected
click on "Mercury"
click on "Saturn"
scroll down until page contains "And all inside of a ScrollView!"

Step 6: The outcome of the test case will look something like this.

Complete test case 1

The testRigor equivalent of the above test steps will be as follows:
click on "Views"
click on "Controls"
click on "Holo Dark Theme"
enter "This is to verify mobile testing" into "hint text"
click checkbox "Checkbox 1"
click checkbox "Checkbox 2"
click radiobutton "RadioButton 1"
click radiobutton "RadioButton 2"
check that radiobutton "RadioButton 1" is not selected
click on "Mercury"
click on "Saturn"
scroll down until page contains "And all inside of a ScrollView!"

Step 7: 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. In case of any failure, there are logs and error text that are available easily 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.

Test Case 2: User performs ‘click counter’ functionality

Step 1: Come back to the Test Cases section. Provide the test case Description and start adding the test steps.

Step 2: Since the mobile app’s .sdk file is available for testRigor to run test suites on, it will directly open the home page for you. You can see the ‘Views’ option over here, click it using testRigor’s plain English command:
click on "Views"
Step 3: Scroll down through the list till you see ‘TextSwitcher’. Scroll and click on it using below testRigor commands:
scroll down up to 10 times until page contains "TextSwitcher"
click on "TextSwitcher"

Step 4: On this screen, you will see a ‘NEXT’ button, and a number counter-initialized to 0. Click thrice on the ‘NEXT’ button as shown below:

click on "NEXT" 3 times
Step 5: Check the counter. It should show the number 3. You can easily assert conditions in plain English using testRigor:
check that page contains "3"
Step 6: Go back to the ‘Views’ screen using below testRigor’s command:
go back

Complete test case 2

The testRigor equivalent of the above test steps will be as follows:
click on "Views"
scroll down up to 10 times until page contains "TextSwitcher"
click on "TextSwitcher"
click on "NEXT" 3 times
check that page contains "3"
go back

Step 7: 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. In case of any failure, there are logs and error text that are available easily 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.

Test Case 3: User is redirected to device accessibility settings through the app

Step 1: Come back to the Test Cases section. Provide the test case Description and start adding the test steps.

Step 2: Since the mobile app’s .sdk file is available for testRigor to run test suites on, it will directly open the home page for you. You can see the ‘Views’ option over here, click on it using testRigor’s plain English command:
click on "Views"
Step 3: Goto ‘Accessibility’, use this command:
click on "Accessibility"
Step 4: Choose ‘Accessibility Service’.
click on "Accessibility Service"
Step 5: The screen will have a button at the bottom of the page. Click on this button through this testRigor’s command:
click on button

Step 6: You will be redirected to the device’s Accessibility settings page.

Here, make a check to see if the title contains the word ‘Accessibility’ or not using simple plain English assertion:
check that page contains "Accessibility" in the title
Step 7: Once on the device’s Accessibility settings page, come back to the app through the following command:
go back
Step 8: To verify if you’ve successfully navigated back to the app, you can compare the current screen (that is the app screen) with a previously saved screenshot. This screen shot needs to be saved in the test data section as a variable.
compare screen to stored value "accessibilityPageApp" with allowance of "10%" treating error as "minor"

When comparing two images, you can set a percentage value to tell testRigor how much variance should be allowed during this comparison. Variance can occur in terms of the dimensions of both images. In the above command, we treat this image variance as minor if it is no greater than 10%.

Step 9: Now press the home button to exit all apps.
press home

Complete test case 3

The testRigor equivalent of the above test steps will be as follows:
click on "Accessibility"
click on "Accessibility Service"
click on button
check that page contains "Accessibility" in the title
go back
compare screen to stored value "accessibilityPageApp" with allowance of "10%" treating error as "minor"
press home

Step 10: 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. In case of any failure, there are logs and error text that are available easily 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.

Test Scenario 2: Testing a web-based app on a mobile device

If you want to test a web app on a mobile device, you need to select the specific option during test suite creation. Once you do that, you can create test cases for the app.

The English commands are similar to those used for desktop web testing and native mobile testing, as seen in the above sections. Here’s an example of a web app testing on a mobile device using testRigor.

Step 1: Once you’ve created the relevant test suite, go to the Test Cases section within the test suite. Provide the test case Description and start adding the test steps.

We will test the testRigor website’s mobile version. Here’s the flow of the test case.

Step 2: Go to the official testRigor website and click on the main menu using the below testRigor command:
click on "menu"
Step 3: Go into the ‘Features’ menu. You can use the relative position of the element on the screen to identify an element. Use testRigor’s plain English command as below:
click on "Features" below "AI Testing"
Step 4: Click on the ‘Top Features’ option using this testRigor command:
click on "Top Features"
Step 5: Scroll down to the bottom to where the social media web links are available. Easily scroll the screen as below:
scroll down
Step 6: Next step is to click on the LinkedIn icon.
click on "LinkedIn"
Step 7: After URL redirection, check that the URL is that of LinkedIn using the below English assertion:
check that url contains "linkedin.com"
And finally come back to the app through the following command:
go back

Complete test case

The corresponding testRigor test case will look like this:
lick on "menu"
click on "Features" below "AI Testing"
click on "Top Features"
scroll down
click on "LinkedIn"
check that url contains "linkedin.com"
go back

Step 8: 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. In case of any failure, there are logs and error text that are available easily 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

Apart from the simplistic test case design and execution, some advanced features help you test your application using simple English commands.

  • 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 easily manages the 2FA, QR Code, and Captcha resolution through its simple English commands.
  • Email, Phone Call, and SMS Testing: Use simple English commands to test the email, phone calls, and SMS. These commands are useful for validating 2FA scenarios, with OTPs and authentication codes being sent to email, phone calls, or via phone text.
  • 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.

In this way, you can use testRigor to test your apps with minimal effort. This AI-based tool not only makes test creation and execution easy but also reduces the burden of test maintenance that tends to arise during automation testing.

Additional Resources

You can read more about testRigor’s providers(as seen during test suite creation) for mobile testing in the integrations section

Join the next wave of functional testing now.
A testRigor specialist will walk you through our platform with a custom demo.
Related Articles

How to execute test cases in parallel in testRigor?

Parallel execution plays a significant role in End-to-End (E2E) testing for several reasons, mainly time constraints and thorough ...

How to reference elements by UI position using testRigor?

When referring to an element in the DOM, testRigor never relies on unstable XPaths, and it uses testRigor locators instead. ...

How to test QR codes using testRigor?

QR codes have become a game-changer for software applications. Users can access websites, download content, or even make secure ...