Test Case Execution on Android Emulators and iOS Simulators Using TestGrid
Overview:
This feature enhances TestGrid’s codeless testing capabilities by enabling users to execute automated test cases on Android emulators and iOS simulators hosted on the server. It offers a convenient and scalable alternative to real device testing for mobile applications. The workflow for creating and executing test cases on emulators and simulators is designed to closely align with the existing process used for real devices within TestGrid’s codeless testing module.
How can we write test cases in a scriptless way, and how can we run our local scripts on a TestGrid simulator or emulator?
Step 1: Log in to TestGrid with valid credentials. After logging in, you will see the TestGrid dashboard.
- Navigate to the Codeless Module: Begin by accessing the “codeless” module within the TestGrid website.
Step 2: How to write the test case in the scriptless generator:
- Select Project and Version: Choose the specific project and version where you intend to create your test cases.
- Open “Test Cases” and Record New Test Case: Once your Scripless Project is open, navigate to the “Test Cases” section. Click on the button labeled “Record New Test Case” to begin creating a new test case.
- Name Your Test Case: Enter a descriptive name for the test case you are about to create.
- Upload Application Build/Bundle Identifier: Select and upload the application build file for the platform you wish to test
- For Android emulator testing, upload the .apk file.
- For iOS Simulator testing, upload the .ipa file.
- Select Emulator Devices: Choose the specific Android emulator devices on which you want to create and execute your test case.
- Start Writing Test Case: Click the “Start Writing Test Case” button to initiate the codeless test case creation process on the selected emulator.
Step 3: Write the test case in the scriptless generator.
- Create Test Steps: Utilize TestGrid’s scriptless methodology to define the sequence of actions and assertions that constitute your test case on the emulator
- Save Your Test Case: Once you have finished scripting the test steps for your desired functionalities, click the “Save” button to store the newly created test case.
Step 4: Test case execution on emulator device:
- Initiate Test Execution: You have two options to run your test case on the selected emulator devices:
- Click the “Run” button directly on the scriptless page.
- Navigate back to the dashboard and manually select and run the desired test case.
- View Execution Results: After the test case execution is complete on the emulator devices, click on the “Build Summary” section to access and review the detailed results of your test execution on the emulated environment within TestGrid’s device cloud interface.
Note: As of now, codeless/scriptless test case creation is not supported for iOS simulators.
Executing Local Automation Tests on Emulators/Simulators with TestGrid Overview:
TestGrid allows you to execute your locally developed automation test scripts on emulators (for Android) and simulators (for iOS) available within its device cloud. This feature streamlines the testing process by providing access to a wide range of virtual devices and a centralized platform for managing test execution and results.
Step 1: Access the TestGrid Dashboard: After successfully logging into the TestGrid platform, you will be directed to the main dashboard.
- Navigate to the “TestGrid capability generator” within the platform.
Step 2: How to generate the desired capabilities for emulator and simulator devices for local execution.
- Select the specific emulator (Android) or simulator (iOS) device you intend to use for your local test execution.
- Choose the relevant project name and the desired platform name/version.
- Click the “Generate” button to create the necessary Appium capabilities.
- Select your preferred programming language for the capability generation.
- Use the clipboard button on the right-hand side to copy the generated capabilities.
Step 3: Integrate Capabilities into Local Automation Code:
- Paste the copied Appium capabilities into your local automation test script. Ensure that these capabilities are used to define the desired emulator or simulator device for your test execution.
- Important: Make sure you select the same emulator/simulator device in the capability generator as the one you intend to use for execution.
-
Execute Local Automation Tests:
Run your local automation test script. Your script, configured with the TestGrid-generated capabilities, will now connect to the specified emulator or simulator in the TestGrid device cloud and execute your test cases.
Step 4: View Test Execution Results: To review the outcome of your test execution:
- Navigate back to the TestGrid dashboard.
- Under the “Test Results” section, click on “Automation Sessions.”
- Locate the specific test session you want to analyze. Here, you can view:
- Video recording of the test execution.
- Execution logs.
- The project name and the specific emulator/simulator device on which the tests were executed.
- The “Build Summary” provides an overview of the test results, including the number of successful and failed test cases.
This process allows you to leverage TestGrid’s device cloud of emulators and simulators for executing your locally developed automation tests and provides comprehensive reporting of the test outcomes.
Happy Testing !!