Mobile AI - SauceLabs Integration
Mobile AI Blueprints and scenarios can be run using tools like SauceLabs just like BrowseStack.
SauceLabs allows you to run tests in the cloud on more than 700 different browser platforms, operating systems and device combinations, providing a comprehensive test infrastructure for automated and manual testing of desktop and mobile applications using Selenium, Appium, and JavaScript unit testing frameworks
When you do not have an infrastructure built using Appium to build and develop tests using AppvanceIQ, platforms like BrowserStack or SauceLabs can be used for testing mobile apps on real devices, emulators or Simulators.
Below are the steps to be followed to download, configure and run your tests from Appvance IQ using BrowserStack.
-
Login to AIQ and click Create Blueprint under AI Scripting
-
Click Mobile
-
Under Service, Choose SauceLabs
-
Pick your Platform, Android or IOS
-
Under Mobile Configuration, Choose between a Physical device or emulator/simulator
-
Click Download Template
-
Open the downloaded JSON file in your favorite editor.
Copy[
{
"serverURL": "{https://username:accessKey@ondemand.saucelabs.com:443/wd/hub}",
"proxyURL": "",
"capabilities": {
"appiumVersion": "{Appium version}",
"platformVersion": "{Android version}",
"deviceName": "{Android GoogleAPI Emulator}",
"deviceOrientation": "portrait",
"browserName": "",
"app": "{URL of .apk}"
}
}
]Emulator Account Configuration
-
Login
-
Click your user profile and select User Settings
-
Note the name in the USER NAME box
-
Note the value in the Access Key box to provide in the serverURL of the JSON file.
App Under Test
Option 1: Upload App to a publicly accessible URL
For example, your app may reside on Amazon’s S3 as
-
https://myfiles.s3-region.amazonaws.com/myfolder/myapp.ipa (iOS for .ipa/physical device)
-
https://myfiles.s3-region.amazonaws.com/myfolder/myapp.zip (iOS for .app/simulator)
Once uploaded, click the link to make sure the file downloads (Making sure of any permission issues)
Option 2: Uploading App to SauceLabs Cloud (for Virtual Devices)
-
Update the following command to include your Sauce username, the file to upload, and the path where the file resides:
-
From an OS X/Linux TerminalFrom an OS X/Linux Terminal
-
From a Windows Command Prompt
-
Upon successful upload, you’ll receive a Hash response.
-
iOS .app Applications Must be in a .zip File
-
If you create your iOS application as a .app directory with multiple files, you need to export it as a .zip file before uploading. If you have created your app as a .ipa file, you can upload that file directly without needing to zip it up.
-
Obtaining App Package and Activity (This is not required as we provide the URL of the app and SauceLabs automatically picks up the required details).
Further documentation can be found on the SauceLabs website
Android
Request appPackage and appActivity from the developer
iOS (assumes using a Mac)
-
Request bundle identifier from developer
OR
-
Right-click the IPA file and select Show Package Contents
-
Locate and open the *.plist file in a text editor
-
Locate the bundle identifier (bundleid or similar) which should have a string tag in proximity to the bundle id
-
For example com.appvance.AIQSTG
-
Edit the downloaded JSON file based on the information from SauceLabs
Uncertain if the parameters are correct? Use the Platform Configurator as a guide.
-
From the Blueprint screen, choose scan type as SmartTags (if you have already created SmartTags), SmartTags + inputs (If you have already created SmartTags), Tags
-
Browse the edited JSON file.
-
Click Next.
-
Provide the Execution details, Choose CSV to map the inputs if already created or can be left blank, or choose Default, Click Create.
-
The Blueprint would be started on the SauceLabs platform with the provided configurations and you will start seeing the results, below is a screen-shot of the test running and showing the results in Appvance IQ.