Sauce Labs offers public and private real device cloud with instant access to 2,000+ Android and iOS mobile devices. For the early development cycle, Sauce Labs also offers emulators and simulators.
Using MoQuality with Sauce Labs integration, you can easily create and run automated Appium tests on both virtual and real devices in the cloud.
Sauce Labs' Real Device Cloud offering was formerly known as Test Object. With your Sauce Labs account, you can do both - Live Testing (using emulators and simulators on Sauce Labs platform) and Automated App Testing (using Test Object platform).
If you don't have an existing account, you can signup at https://saucelabs.com/sign-up.
You can create Appium Tests and run on real Android and iOS devices from your MoQuality dashboard. Follow these steps to get started:
- Fetch your Test Object account details - Username and API Key
- Login to your MoQuality Dashboard - www.app.moquality.com
- Connect to a device on Sauce Labs
- Create a Test
- Create a Run to run the test on a real device on Sauce Labs
- View the results on MoQuality Dashboard.
To find your username and API Key details you need to first login to your account. https://app.testobject.com/#/login
Click Account Settings.
Copy your User API Key and Username.
Now you need to put these details in your MoQuality account. Login at www.app.moquality.com. Go to project settings.
Click 'Connect to Sauce Labs'.
Add your account details to the Test Object integration section.
To create a test, first, you need to make sure you have uploaded your app to the project on MoQuality Dashboard. Follow the instructions here - Upload an App
Next, on your project dashboard, click on the app you want to create a test for.
- Click Create in the navigation bar on the left.
- Click 'Test' to create a new Test.
- Connect to a device on Sauce Labs.
- Install and start MoQuality agent using the commands shown:
- Select a device OS version and click 'Initialize Appium'. Now MoQuality will pick an available device from the Sauce Labs cloud, install the app and initialize Appium on it.
- Once your app launches in the browser, you are ready to create a new test. Here, we will create a simple test on the Calculator App.
- A test comprises of test steps. Each test step requires two inputs - select filter and choose action.
Select a UI element on the app screen or choose one from the UI Hierarchy. For this example, let us pick 4. You can see that by default the Resource ID selection filter is applied, which means it will automatically add the logic of selecting this element uniquely by using the condition that Resource ID = id/btn4.
Next, from the available actions for this button, we want to click on it. So you can choose, Touch: Click action.
- Click 'Add' to finish adding this step to the step.
To run any test on real devices on the cloud on Sauce Labs, you need to create a new run using MoQuality Dashboard as you would usually do. Follow these steps:
Pick a version of your app using the dropdown.
You can select tests that you have created on MoQuality. When you add tests, they run in the order specified in this configuration. You can add each test to the configuration by clicking on the "+" icon next to the test. You can add a test multiple times and can change the ordering by dragging them by the handlebars on the left.
While adding a Robo Test, you can change the time limit (i.e., how long the robo should test the app), and the step limit (i.e., how many steps the robo should execute).
Once you make your selection, your configuration should look like this.
Filter by Sauce Labs and select one of the devices available from your account.
If your test uses any test data, you can add them here optionally in CSV format. You can also generate random test data with MoQuality's inbuilt test data generator.
In the final step, you can review your test run and hit "Start Run" to schedule it for an instant run. The test would be run on the devices selected and the results would appear on the dashboard within a few minutes after.
To learn more about creating a new run, see Create a Run in our docs.
Updated about a month ago