Building Mobile App Test Automation into a Cloud-based Continuous Integration Pipeline. Mark Pedersen YOW! Connected 2015

Similar documents
Speed to Market in Mobile Development

Continuous Integration (CI) for Mobile Applications

Mobile Test Automation Framework

Cross Platform Mobile. -Vinod Doshi

Appium mobile test automation

Better Software Though Expertise, Collaboration & Automation. BDD, DevOps and Testing

Automated testing for Mobility New age applications require New age Mobility solutions

Mobile App Testing. Main challenges, different approaches, one solution

Dealing with Device Fragmentation in Mobile Games Testing. Ru Cindrea - Altom Consulting

Web UI & Functional Test Automation for Continuous Agile Deliveries

automated acceptance testing of mobile apps

Mobile Automation: Best Practices

The Hitchhiker's Guide to Mobile Apps Test Automation Galaxy

AUTOMATED MOBILE TESTING REQUIRES BOTH REAL DEVICES AND EMULATORS

Automated Mobile Testing Requires Both Real Devices and Emulators

Best Practices for Performance Testing Mobile Apps

geniusport mobility training experts

Efficient Mobile Testing Georg Thurner Mike Nemeth, September 18, Copyright 2014, Tricentis GmbH. All Rights Reserved. 1

RUN THE RIGHT RACE. Keep pace with quickening release cycles. Discover automation with the human touch. CHOOSE A TEST TO RUN BELOW

Build Automation for Mobile. or How to Deliver Quality Apps Continuously. Angelo Rüggeberg

DevOps Course Content

Accelerating Business Value by

Open source Test Automation Tools for Mobile Applications A Primer

Mobile Testing Automation

Case Study: Snaptracs

Testing Mobile Application using Device Cloud

Mobile App Development: The CD Recipe Jenkins + Functional and Non-functional Testing + Real Devices. Carlo Cadet, Director, Technical Evangelists

Build apps your users will love with Xamarin. Mobile Edge 11 Nov 2015

MagenTys Testing Services Page 2

Fast Feedback: Jenkins + Functional and Non-Functional Mobile App Testing Without Pulling Your Hair

Mobile Test Automation - Right Tools and Right Approach

Business Assurance & Testing QEx Automation Platform

Practicing Continuous Delivery using Hudson. Winston Prakash Oracle Corporation

Why HTML5 Tests the Limits of Automated Testing Solutions

Client Overview. Engagement Situation. Key Requirements

Software Continuous Integration & Delivery

Challenges and Pains in Mobile Apps Testing

Increase Your Mobile Test Automation ROI

MENDIX FOR MOBILE APP DEVELOPMENT WHITE PAPER

BDD FOR AUTOMATING WEB APPLICATION TESTING. Stephen de Vries

What s new in the HP Functional Testing 11.5 suite Ronit Soen, product marketing John Jeremiah, product marketing

International Journal of Advanced Engineering Research and Science (IJAERS) Vol-2, Issue-11, Nov- 2015] ISSN:

Migration Scenario: Migrating Batch Processes to the AWS Cloud

Client Overview. Engagement Situation

How Simple Is It To Develop a Mobile App? Uma Sudhan OpenEdge Developer 7 th Oct 2013

Open Source in Mobile Test Automation. Ru Cindrea - Altom ru@altom.ro

Simple Mobile Application & Browser Testing

Whitepaper. Continuous Integration Tools Applying Best Practices to the Toolchain

QEx Whitepaper. Automation Testing Pillar: Selenium. Naveen Saxena. AuthOr:

Massively! Continuous Integration! A case study for Jenkins at cloud-scale

Drupal CMS for marketing sites

How to Get the Most out of Your CI/CD Workflow Using Automated Testing

a new generation software test automation framework - CIVIM

An Advanced Performance Architecture for Salesforce Native Applications

Behaviour Driven Development with Cucumber for Java

Guide to Mobile Testing

How To Achieve Continuous Delivery

HOW TO GET THE MOST OUT OF YOUR CI/CD WORKFLOW USING AUTOMATED TESTING

1 Overview Configuration on MACH Web Portal 1

Mobile Test Automation: Lessons Learned in the Trenches

Hands-On Lab. Embracing Continuous Delivery with Release Management for Visual Studio Lab version: Last updated: 12/11/2013

The Truth About Enterprise Mobile Security Products

Testing in a Mobile World

Submitting UITests at the Command Line

Testing Tools using Visual Studio. Randy Pagels Sr. Developer Technology Specialist Microsoft Corporation

AWS Device Farm. Developer Guide API Version

TesT AuTomATion Best Practices

Mobile Performance Testing Approaches and Challenges

MOBILE METRICS REPORT

Continuous Delivery for Alfresco Solutions. Satisfied customers and happy developers with!! Continuous Delivery!

Viewpoint. Choosing the right automation tool and framework is critical to project success. - Harsh Bajaj, Technical Test Lead ECSIVS, Infosys

KASPERSKY SECURITY INTELLIGENCE SERVICES. EXPERT SERVICES.

S ELEC T IONS F ROM DZON E S GU ID E TO M OB ILE D E V E LO P M E N T 2015 EDITION R E S E AR C H PA RTNER SPOTLIGHT

Continuous Integration

From Traditional Functional Testing to Enabling Continuous Quality in Mobile App Development

Launch High-Performing Mobile Apps with Appurify. Manish Lachwani CTO and Co-founder Jay Srinivasan CEO and Co-founder

On the Edge of Mobility Building a Bridge to Quality October 22, 2013

SOA-14: Continuous Integration in SOA Projects Andreas Gies

QA Tools (QTP, QC/ALM), Selenium with Java, Mobile with Automation, Unix, SQL, SOAP UI

WELCOME TO CITUS CLOUD LOAD TEST

About Me Developer Workspaces Enable Agile Teams

Ensuring Mobile Application Quality Across Your Application Lifecycle

How To Develop An Open Play Context Framework For Android (For Android)

Continuous Integration and Delivery. manage development build deploy / release

Load and Performance Load Testing. RadView Software October

Selenium Grid Build vs. Buy

Making Leaders Successful Every Day Forrester Research, Inc. Reproduction Prohibited

Auditing the Security and Management of Smart Devices. ISACA Dallas Meeting February 13, 2014

Testing Made Awesome

DEPLOYMENT. ASSURED. SEVEN ELEMENTS OF A MOBILE TEST STRATEGY. An Olenick & Associates White Paper

Why effective Test Automation drives successful and qualitydriven mobile payments

Visual Studio Team Edition for Database Professionals. Woody Pewitt Developer Evangelist

Cloud A Practitioner Prakat Solutions

Sisense. Product Highlights.

Securing mobile apps in the Enterprise

MOVING TO THE NEXT-GENERATION MEDICAL INFORMATION CALL CENTER

AppStack Technology Overview Model-Driven Application Management for the Cloud

HP Application Lifecycle Management

eggplant for Cross Platform Test Automation TestPlant Nick Saunders

Info-Security Conference Securing Your Applications in the Cloud. 29 May 2013

Transcription:

Building Mobile App Test Automation into a Cloud-based Continuous Integration Pipeline Mark Pedersen YOW! Connected 2015

QA shifting from being concentrated in specialist testing roles back to being diffused throughout the software lifecycle

Assembling the Solution

Issues with Test Automation Test Automation = Software Development Maintainability = Sustainability Platform Fragmentation is not your friend

How much device coverage do you actually need?

Barriers to Mobile App Test Automation Platform control ios is strictly controlled, making automation tricky Apps either need to be instrumented, or ios must be jailbroken OR. You can use Appium Android apps less restricted, but root access may be needed for full test automation Object recognition Native object recognition not always reliable Must find a reliable element to recognise Embedded Web View elements require special handling

Appium Architecture

Why Cucumber? Requirements and test execution are inherently linked

Automation in BDD Given I have some test scenarios written in a cucumber style When I process those scenarios with a cucumber parser Then the corresponding pieces of automation code will be executed

Writing Scenario's in Cucumber Scenarios are organized together into features Each feature is represented as a plain text file. Feature files must have the.feature extension Each feature can contain many scenarios

Step Annotations import cucumber.annotation.en.*; Each Gherkin step keyword has a Annotation @Given("^I have a test written in a cucumber style$") public void methodname() { }

Capturing Arguments @Given("^an owner with a pet called \"Sly\"$") public void an_owner_with_a_pet_called() { } @Given("^an owner with a pet called \"([^\"]*)\"$") public void an_owner_with_a_pet_called(string name) { }

Cross Platform Scripting Approach Framework component Feature layer Given Open App Example Step Definition layer View layer public void Open_app(){ if(system.getproperty("platform").equals("android")) objstepview.androidopenapp(); else if(system.getproperty("platform").equals("ios")) objstepview.iosopenapp(); } public void AndroidOpenApp(){ WebDriverWait nwait = new WebDriverWait(objStepBase.getDriver(), 360); nwait.until(expectedconditions.presenceofelementlocated(objhomepage.getnotnow())); objutilities.takescreenshot(); objhomepage.clicknotnowlink(); } Page layer public By getnotnow(){ By mysearchcriteria = null; if (System.getProperty("platform").equals("android")){ mysearchcriteria = By.name("Not now"); } else if (System.getProperty("platform").equals("ios")){ mysearchcriteria = By.xpath("//UIAApplication[1]/UIAWindow[1]/UIAButton[1]"); } return mysearchcriteria; }

Structuring Features Cross platform scenarios Given the underlying step definitions, views, page objects support cross platform logic, When a single script is tagged with both @Andoid and @ios It will be run on both platforms by the relevant maven task Alternatively, individual platform scripts can be maintained One feature file can contain multiple scenarios Individual scenarios shouldn t be be too long Max executions limit on your device cloud can be easy to hit!!

TestDroid: Devices in the Cloud Other Device Clouds: SauceLabs Xamarin TestCloud AWS Device Farm Android only Google Cloud Test Lab Not yet launched

Connecting with Test Droid if(objconfig.getproperty("test.os").equals("android")) { DesiredCapabilities capabilities = new DesiredCapabilities(); capabilities.setcapability("platformname", objconfig.getproperty("device.platformname")); capabilities.setcapability("testdroid_target", objconfig.getproperty("test.testdroid.target")); capabilities.setcapability("devicename", objconfig.getproperty("test.testdroid.devicename")); capabilities.setcapability("testdroid_username", objconfig.getproperty("test.testdroid.username")); capabilities.setcapability("testdroid_password", objconfig.getproperty("test.testdroid.password")); capabilities.setcapability("testdroid_project", objconfig.getproperty("test.testdroid.project")); String strtestrun = objconfig.getproperty("test.testdroid.testrun") ; Calendar cal = Calendar.getInstance(); strtestrun = strtestrun + "_" + cal.get(calendar.date) + (cal.get(calendar.month) + 1) + cal.get(calendar.year) + "_" + cal.get(calendar.hour_of_day) + cal.get(calendar.minute); capabilities.setcapability("testdroid_testrun", strtestrun); capabilities.setcapability("testdroid_device", objconfig.getproperty("test.testdroid.device")); capabilities.setcapability("testdroid_app", objconfig.getproperty("test.testdroid.app")); } androiddriver = new AndroidDriver(new URL(objConfig.getProperty("test.testdroid.server")+"/wd/hub"), capabilities);

Connecting with TestDroid test.testdroid.platformname=android test.testdroid.target=android test.testdroid.devicename=android Device test.testdroid.username=mark.pedersen@kjross.com.au test.testdroid.password=magicpudding test.testdroid.server=http://appium.testdroid.com test.testdroid.project=ju_appiumandroid2 test.testdroid.testrun=androidrun test.testdroid.device=samsung Galaxy S V SM- G900F (Europe) test.testdroid.app=latest test.testdroid.package=android.abcapplication test.testdroid.activity=android.abcapplication.activities.preloaderactivity test.testdroid.waitactivity=android.abcapplication.activities.preloaderactivity

Tester Integrating with Bamboo

Integrating with Bamboo

Integrating with Bamboo Bamboo Bamboo Plan Configuration 1 stage 2 Jobs (can run in parallel) Run Android Tests Run ios Tests Each job: Check out code from repository Run Maven 3 clean test with options Maven options: - Denv: local testdroid - Dplatform: android ios - Ddevice: <device name> - Dcucumber.options: - - tags @Android etc

CI Integration Recommendations Scheduled test runs rather than trigger on check- in Create one Bamboo job for each device/platform to be tested Create and enable one maven task in each job You may end up creating a set of maven tasks for each device and just enabling the right task for the configuration you want

Challenges Getting the structure of the automation abstractions right takes time: You must balance ease of use by script writers (who may be non- technical product owners) with ease of maintainability by technical team (test automators / developers) Device Clouds are shared resources: TestDroid device availability frequently caused timeouts You need to either invest in hardening your local execution methods against timeouts Or pay more to get server- side execution / dedicated devices Re- writes of apps means updating automation Pick the right time to start! The cultural challenge of getting features files to be the single point of truth for requirements is possibly biggest challenge we re still working on that.

QUESTIONS? mark.pedersen@kjr.com.au @mark_j_pedersen