Move as Fast as Your Users with Mobile Test Automation
Arif Muhammad
DevOps: Continuous Delivery
CA Technologies, Inc
Director Product Management
DO4X142S
#CAWorld
2 © 2015 CA. ALL RIGHTS RESERVED.@CAWORLD #CAWORLD
For Informational Purposes Only
Terms of this Presentation
© 2015 CA. All rights reserved. All trademarks referenced herein belong to their respective companies. The presentation provided at CA
World 2015 is intended for information purposes only and does not form any type of warranty. Some of the specific slides with customer
references relate to customer's specific use and experience of CA products and solutions so actual results may vary.
Certain information in this presentation may outline CA’s general product direction. This presentation shall not serve to (i) affect the rights
and/or obligations of CA or its licensees under any existing or future license agreement or services agreement relating to any CA software
product; or (ii) amend any product documentation or specifications for any CA software product. This presentation is based on current
information and resource allocations as of November 18, 2015, and is subject to change or withdrawal by CA at any time without notice. The
development, release and timing of any features or functionality described in this presentation remain at CA’s sole discretion.
Notwithstanding anything in this presentation to the contrary, upon the general availability of any future CA product release referenced in
this presentation, CA may make such release available to new licensees in the form of a regularly scheduled major product release. Such
release may be made available to licensees of the product who are active subscribers to CA maintenance and support, on a when and if-
available basis. The information in this presentation is not deemed to be incorporated into any contract.
3 © 2015 CA. ALL RIGHTS RESERVED.@CAWORLD #CAWORLD
Abstract
Living in a “Mobile-First” world presents organizations with new and ever-
changing application test challenges. Being able to deliver Mobile Applications
quickly with high quality is a huge task faced by organizations. Separating the
application code logic from the UI can produce more precise results faster, but
creates added challenges to quality. CA Application Test facilitates the testing
both on services/API layer and extends the acceptance test to mobile. By
incorporating platform independent mobile and API test automation under a
single test automation framework. Automation enables you to design tests
against multiple platforms (iOS, Android) without requiring building
applications differently. Hybrid support allows you to test devices on premise
or connect to a cloud device testing service. Join us and learn more about
these advances and others can enable you to deliver better mobile
applications faster.
Arif Muhammad
CA Technologies
4 © 2015 CA. ALL RIGHTS RESERVED.@CAWORLD #CAWORLD
Agenda
MOBILE APPLICATIONS AND RELATED TESTING COMPLEXITIES
DEALING WITH THE COMPLEXITY
Q & A
CA’S DEVTEST PORTFOLIO
CLOSER LOOK AT CA APPLICATION TEST FOR MOBILE
EXECUTING TESTS LOCALLY OR IN A CLOUD LAB
1
2
3
4
5
6
5 © 2015 CA. ALL RIGHTS RESERVED.@CAWORLD #CAWORLD
Mobile application validation – Complexity
ESB
Enterprise mobile applications complement customer facing web applications and rely on data layer
Validation requires working with the layers
6 © 2015 CA. ALL RIGHTS RESERVED.@CAWORLD #CAWORLD
Developing mobile applications is different than traditional development – New challenges abound
ESB
Agile teams work in parallel
Fast and prolific updates to mobile applications
In the hands of customer means higher reliability is demanded
V1
V2
V23
7 © 2015 CA. ALL RIGHTS RESERVED.@CAWORLD #CAWORLD
Approaching “mobile testing”
Validation of mobile applications needs to combine comprehensive leading testing and validationtechniques – it is not a point solution
The system under test is dramatically different than older user interfaces –new approaches need to be applied to be successful
8 © 2015 CA. ALL RIGHTS RESERVED.@CAWORLD #CAWORLD
Continuous Delivery achieved with quality and speed
UI MOBILE API Components DATA DRIVEN CONSTRAINT FREE
FULL SCOPE CONTEXT AWARE CONTINUOUS
INSIGHTFUL AUTOMATED AUTOMATIONPERFORMANCE
ORCHESTRATED
9 © 2015 CA. ALL RIGHTS RESERVED.@CAWORLD #CAWORLD
Pervasive quality –Continuous Delivery achieved with quality and speed
UI MOBILE API Components DATA DRIVEN CONSTRAINT FREE
FULL SCOPE CONTEXT AWARE CONTINUOUS
INSIGHTFUL AUTOMATED AUTOMATIONPERFORMANCE
ORCHESTRATED
CA CAI
C A Service Virtualization
CA Test Data Manager
CA Application Test
CA Release Automation
CA Test Case Optimizer
10 © 2015 CA. ALL RIGHTS RESERVED.@CAWORLD #CAWORLD
What should my mobile test validate? How many do I need? Is it enough?
ESB
CA Test Case Optimizer
Apply model based requirements design
100% coverage of functional logic gates with minimal number of tests
Analyze manual tests –remove duplicates and expand to full coverage
11 © 2015 CA. ALL RIGHTS RESERVED.@CAWORLD #CAWORLD
How can I automate the verification of business API’s needed behind the mobile application?
ESB
CA Application Test
API functional testing
API non functional testing
Does the business logic work and provide data to the mobile application
12 © 2015 CA. ALL RIGHTS RESERVED.@CAWORLD #CAWORLD
Where do we get the data needed to test mobile application presentation and data updates in the enterprise?
ESB
CA Test Data Manager
Functional testing is all about getting the right data to test scenarios
Extract, de-identify and subset production
Create missing data to complete coverage
Capture fully versioned system of record data packs for repeatable regression
13 © 2015 CA. ALL RIGHTS RESERVED.@CAWORLD #CAWORLD
How do I keep up with all of the APIs and get automation to higher levels?
ESB
CA Continuous Application Insight
Agent technologies observes test data during development and UAT
Automatically invoke and verify tests for API’s provides stable regression for API’s used by mobile
14 © 2015 CA. ALL RIGHTS RESERVED.@CAWORLD #CAWORLD
How do we automate functional validation of a mobile application?
ESB
CA Application Test for Mobile
Test on IOS & Android
Functional on device
Cross device test cases
Does the application handle data and present correctly
15 © 2015 CA. ALL RIGHTS RESERVED.@CAWORLD #CAWORLD
CA Application Test for Mobile
Record and Playback
Build your tests in a visual recorder just like what your users experience
Play back local or cloud, emulators/simulators or physical devices
Drive Tests within CI/CD
Integrate mobile testing into your delivery processes with run on demand testing and release testing
Automate your Functional Validations
Automate your validation and creation of validations
Extend the breadth of your teams testing
1 2 3
16 © 2015 CA. ALL RIGHTS RESERVED.@CAWORLD #CAWORLD
CA Application Test for Mobile
Create functional test scripts once and run anywhere
No modifications to the test suite when retargeting execution environment
Native, hybrid and web apps
Supports iOS 8.0+ and Android 4.2+
17 © 2015 CA. ALL RIGHTS RESERVED.@CAWORLD #CAWORLD
Test script visual editing
18 © 2015 CA. ALL RIGHTS RESERVED.@CAWORLD #CAWORLD
Target identification
Ways to identify a target– Accessibility labels (added by
developer)
– Widget identifier – button1
– XPath - //UIAButton[@label=‘7’]
XPath across iOS and Android native apps are not compatible while hybrids XPaths are compatible
19 © 2015 CA. ALL RIGHTS RESERVED.@CAWORLD #CAWORLD
Page inspector
20 © 2015 CA. ALL RIGHTS RESERVED.@CAWORLD #CAWORLD
Mobile gestures/actions
21 © 2015 CA. ALL RIGHTS RESERVED.@CAWORLD #CAWORLD
Multiple actions on one page
22 © 2015 CA. ALL RIGHTS RESERVED.@CAWORLD #CAWORLD
Validations
Mobile assert regular expression– Simplest – just add from the
screen shot
Mobile assert – Add from the test flow. More
options and flow control.
Java step assertion– Used for most complex validations
(positioning, ordering and multiple step logic)
23 © 2015 CA. ALL RIGHTS RESERVED.@CAWORLD #CAWORLD
Mobile assert action
24 © 2015 CA. ALL RIGHTS RESERVED.@CAWORLD #CAWORLD
Mobile assert filter
25 © 2015 CA. ALL RIGHTS RESERVED.@CAWORLD #CAWORLD
Java step validation
webDriver – variable to access appium webdriver interface
Example:
var xpath = "//android.widget.LinearLayout[1]/android.widget.FrameLayout[1]/android.widget.FrameLayout[1]/
android.widget.RelativeLayout[1]/android.widget.TableLayout[2]/android.widget.TableRow[1]/ android.widget.TableLayout[2]/android.widget.EditText[1]";
var el_total = _webDriver.findElementByXPath(xpath);
var total = makeFloat(el_total.getText());
testExec.setStateValue("purchase.total", total);
26 © 2015 CA. ALL RIGHTS RESERVED.@CAWORLD #CAWORLD
Mobile lab
Drive tests within an on-premise local lab– Supports iOS and Android
– Multiple versions supported
– Up to 50 devices
Leverages standard DevTestLab management tools and options
*add disclaimer
27 © 2015 CA. ALL RIGHTS RESERVED.@CAWORLD #CAWORLD
Mobile cloud labs supported
Tethered actual devices for IOS and Android
Test creation and execution full featured
Test execution only
28 © 2015 CA. ALL RIGHTS RESERVED.@CAWORLD #CAWORLD
Q & A
29 © 2015 CA. ALL RIGHTS RESERVED.@CAWORLD #CAWORLD
For More Information
To learn more, please visit:
http://cainc.to/Nv2VOe
CA World ’15