+1 404-214-5804
Enterprise Mobility Blog, Mobile App Testing

DevOps Deployment and DevOps Test Case Automation with deviceConnect

Mobile DevOpsOne of mobility’s great challenges has been to replicate the benefits DevOps and Agile methodologies bring to traditional Web development.  Although mobility is the clear successor to traditional Web development, rapid deployment into test environments and hands-off test case automation on real mobile devices have been challenging for the mobile space largely because of app store models and other restrictions imposed by phone and tablet manufacturers.

Test Build Deployment Automation

The ground DevOps has gained for Web testing includes automatically and rapidly building test environments that mirror their production targets and managing multiple automated test cases. Mobility is in great need of these same benefits, and deviceConnect™, Mobile Labs’ private mobile device cloud for mobile testing, can get the job done.  Mobile Labs partnered with IBM, for example, to offer a plug-in to that company’s UrbanCode Deploy product, a part of Rational test suite.  The Mobile Labs’ plug-in combines deviceConnectCLI’s real-device deployment capabilities with UrbanCode Deploy’s automated deployment processes. You can read more about Mobile Labs and UrbanCode Deploy in our recent blog post, “Mobile Labs Partners with IBM for Mobile DevOps.”

deviceConnectCLI is capable of adding or removing versions of apps from the deviceConnect data base, and can install, remove, or update apps on real devices quickly and easily.  It is easy to build scripts that obtain a list of devices, select devices based on their capability, and then connect to devices and launch apps.

Automated Mobile App Testing: Test Case Automation

To build a self-sufficient, fully automated test case, an automation script needs only to issue a deviceConnectCLI command to connect to a device.  To build an example of test case automation that manages a test case on four devices concurrently, we used HP ALM.  This allowed us to initiate test runs on remote virtual machines with no manual intervention.  deviceConnect, Mobile Labs Trust™, ALM, and UFT cooperate to load a test case,  retain and open a deviceConnect device, and then to run the test case.  After the case finishes, the device is closed and returned to the available pool.  Run results can be viewed immediately or at a later time, including screen captures of each step.  It is also possible (but not necessary) to open the virtual desktops and see the tests run.

We put deviceConnectCLI parameters into a data sheet as shown below:

Mobile DevOps


We then built the following command-line parameters from the data sheet.  These parameters are passed to deviceConnectCLI: mike@ml.sys abcdef12 -d “asus_05e89b1a” -scale 50 -r “Phone Lookup”

The parameters locate the deviceConnect cabinet, pass it a valid username and password, create a connection to a device, and then launch the app on that device. We start the device session with this VBScript command:

SystemUtil.Run “MobileLabs.DeviceConnect.Cli.exe”, strConnectParam,  Environment(“strCLIPath”)

The variable “strCLIPath” contains the path to the deviceConnectCLI program on our system and comes from the CLI_Path cell in the data sheet.   To automate this test from HP’s ALM, we saved and imported a data sheet for each device we wanted to test.  The same script is used on all devices.  We also passed the IP address of each virtual machine.

The video below shows the process automatically obtaining four devices, and with a reduced-scale view of each of the virtual desktops on screen, we can see the four tests running at the same time.  Note that we chose to view the desktops, but the machines would have — and did — run unattended, with run results available for viewing at our convenience. A single script drove an Android phone and tablet as well as an iOS phone and tablet.

deviceConnect brings the gains of DevOps to mobility by automating the deployment of test builds and by running test cases against those builds as a part of continuous integration and, if desired, continuous testing.  The capability to automate mobile app build deployments as well as to automate test cases against those builds brings the high-velocity integration and test integration benefits so widely enjoyed in standard Web development to the developers and testers of mobile apps.

Learn more about deviceConnect, and the Mobile Labs solutions here.

Shweta Bhati

Shweta Bhati is a senior automation engineer for Mobile Labs. In her role, Shweta is responsible for handling Mobile Labs internal product quality & test endeavors and providing technical support for Mobile Labs’ customers. With expertise is in HP ALM / Quality Center, HP QTP/UFT-based test automation framework development, manual and automated mobile application testing, maintenance and execution, Shweta is a critical member of the Mobile Labs team. Prior to Mobile Labs Shweta worked on various test automation projects for Pyramid Consulting. Shweta holds Masters in Computer Applications from NIEC New Delhi, India. She can be reached at shweta.bhati@mobilelabsinc.com.

More Posts

Leave a Reply

You must be logged in to post a comment.

Why Mobile Labs?

Mobile Labs provides enterprise-grade, next generation mobile application testing tools. With a focus on security, agility and affordability, Mobile Labs delivers solutions to help you deliver quality mobile apps for Android, iOS and Windows platforms while also helping manage mobile devices in a private, secure cloud.

Contact Mobile Labs

3423 Piedmont Road NE
Suite 465
Atlanta, GA 30305
+1 404-214-5804
twitter  facebook linkedin google-plus SlideShare