dreamforce 2014 mobile theatre session - automated testing for salesforce1 mobile apps using the...

34
utomated Testing for Salesforce1 obile Apps Using the Appium amework av Kheterpal – Mobility, Metacube ravkheterpal Starts at 10 AM

Upload: gaurav-kheterpal

Post on 14-Jun-2015

292 views

Category:

Software


0 download

DESCRIPTION

My session at the Mobile Theatre in Dev Zone at Dreamforce 2014 on how to use the open source Appium framework for Salesforce1 mobile app automation testing

TRANSCRIPT

Page 1: Dreamforce 2014 Mobile Theatre Session - Automated Testing for Salesforce1 Mobile Apps Using the Appium Framework

Automated Testing for Salesforce1 Mobile Apps Using the Appium Framework Gaurav Kheterpal Head – Mobility, Metacube @gauravkheterpal

Starts at 10 AM

Page 2: Dreamforce 2014 Mobile Theatre Session - Automated Testing for Salesforce1 Mobile Apps Using the Appium Framework

Safe Harbor Safe harbor statement under the Private Securities Litigation Reform Act of 1995: This presentation may contain forward-looking statements that involve risks, uncertainties, and assumptions. If any such uncertainties materialize or if any of the assumptions proves incorrect, the results of salesforce.com, inc. could differ materially from the results expressed or implied by the forward-looking statements we make. All statements other than statements of historical fact could be deemed forward-looking, including any projections of product or service availability, subscriber growth, earnings, revenues, or other financial items and any statements regarding strategies or plans of management for future operations, statements of belief, any statements concerning new, planned, or upgraded services or technology developments and customer contracts or use of our services. The risks and uncertainties referred to above include – but are not limited to – risks associated with developing and delivering new functionality for our service, new products and services, our new business model, our past operating losses, possible fluctuations in our operating results and rate of growth, interruptions or delays in our Web hosting, breach of our security measures, the outcome of any litigation, risks associated with completed and any possible mergers and acquisitions, the immature market in which we operate, our relatively limited operating history, our ability to expand, retain, and motivate our employees and manage our growth, new releases of our service and successful customer deployment, our limited history reselling non-salesforce.com products, and utilization and selling to larger enterprise customers. Further information on potential factors that could affect the financial results of salesforce.com, inc. is included in our annual report on Form 10-K for the most recent fiscal year and in our quarterly report on Form 10-Q for the most recent fiscal quarter. These documents and others containing important disclosures are available on the SEC Filings section of the Investor Information section of our Web site. Any unreleased services or features referenced in this or other presentations, press releases or public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make the purchase decisions based upon features that are currently available. Salesforce.com, inc. assumes no obligation and does not intend to update these forward-looking statements.

Page 3: Dreamforce 2014 Mobile Theatre Session - Automated Testing for Salesforce1 Mobile Apps Using the Appium Framework

Place Customer or

Partner logo in white area of

slide, centered horizontally

Gaurav Kheterpal Head – Mobility Metacube

Page 4: Dreamforce 2014 Mobile Theatre Session - Automated Testing for Salesforce1 Mobile Apps Using the Appium Framework

• Native App Automation • Hybrid App Automation • How it works? • Best Practices • Continuous Integration • Summary • Q&A

Agenda

• Salesforce1 Mobile • Why Automate? • Mobile Automation Challenges •  Introducing Appium • WebDriver Wire Protocol • Setting Up • Salesforce1 – Sample Mobile Apps

Page 5: Dreamforce 2014 Mobile Theatre Session - Automated Testing for Salesforce1 Mobile Apps Using the Appium Framework

Salesforce1 Mobile Development

Page 6: Dreamforce 2014 Mobile Theatre Session - Automated Testing for Salesforce1 Mobile Apps Using the Appium Framework

Salesforce1 Mobile Development

Page 7: Dreamforce 2014 Mobile Theatre Session - Automated Testing for Salesforce1 Mobile Apps Using the Appium Framework

Salesforce1 Mobile Development

Page 8: Dreamforce 2014 Mobile Theatre Session - Automated Testing for Salesforce1 Mobile Apps Using the Appium Framework

Why Automate?

Page 9: Dreamforce 2014 Mobile Theatre Session - Automated Testing for Salesforce1 Mobile Apps Using the Appium Framework

Why Automate?

Page 10: Dreamforce 2014 Mobile Theatre Session - Automated Testing for Salesforce1 Mobile Apps Using the Appium Framework

Why Automate?

Image courtesy - http://johnhammink.blogspot.kr/2010/11/off-beaten-path-test-automation-that.html

Page 11: Dreamforce 2014 Mobile Theatre Session - Automated Testing for Salesforce1 Mobile Apps Using the Appium Framework

Mobile Automation Challenges

Page 12: Dreamforce 2014 Mobile Theatre Session - Automated Testing for Salesforce1 Mobile Apps Using the Appium Framework

Mobile Automation Challenges

Page 13: Dreamforce 2014 Mobile Theatre Session - Automated Testing for Salesforce1 Mobile Apps Using the Appium Framework

Mobile Automation Challenges

Page 14: Dreamforce 2014 Mobile Theatre Session - Automated Testing for Salesforce1 Mobile Apps Using the Appium Framework

Introducing Appium

• Open source test automation framework • Works for both native and hybrid mobile apps • Uses WebDriver JSON Wire Protocol • No external SDK, No Re-compilation • No knowledge of underlying app source code

Page 15: Dreamforce 2014 Mobile Theatre Session - Automated Testing for Salesforce1 Mobile Apps Using the Appium Framework

Introducing Appium

Page 16: Dreamforce 2014 Mobile Theatre Session - Automated Testing for Salesforce1 Mobile Apps Using the Appium Framework

WebDriver JSON Wire Protocol

• Selenium WebDriver – the de-facto industry standard for browser automation

• Currently a W3C Working ‘Draft’ • Appium runs a HTTP Server managing WebDriver sessions • Server listens for commands, executes on device/ simulator and sends back a HTTP response

Page 17: Dreamforce 2014 Mobile Theatre Session - Automated Testing for Salesforce1 Mobile Apps Using the Appium Framework

Setting up Appium

Page 18: Dreamforce 2014 Mobile Theatre Session - Automated Testing for Salesforce1 Mobile Apps Using the Appium Framework

Setting up Appium

Page 19: Dreamforce 2014 Mobile Theatre Session - Automated Testing for Salesforce1 Mobile Apps Using the Appium Framework

Setting up Appium

Page 20: Dreamforce 2014 Mobile Theatre Session - Automated Testing for Salesforce1 Mobile Apps Using the Appium Framework

Setting up Appium

Page 21: Dreamforce 2014 Mobile Theatre Session - Automated Testing for Salesforce1 Mobile Apps Using the Appium Framework

Setting up Appium

Page 22: Dreamforce 2014 Mobile Theatre Session - Automated Testing for Salesforce1 Mobile Apps Using the Appium Framework

Salesforce1 – Sample Native App

Page 23: Dreamforce 2014 Mobile Theatre Session - Automated Testing for Salesforce1 Mobile Apps Using the Appium Framework

Salesforce1 – Native App Automation Script Creation

Page 24: Dreamforce 2014 Mobile Theatre Session - Automated Testing for Salesforce1 Mobile Apps Using the Appium Framework

Salesforce1 – Native App Automation Script Creation

Page 25: Dreamforce 2014 Mobile Theatre Session - Automated Testing for Salesforce1 Mobile Apps Using the Appium Framework

Salesforce1 – Native App Automation Script Execution

Page 26: Dreamforce 2014 Mobile Theatre Session - Automated Testing for Salesforce1 Mobile Apps Using the Appium Framework

Salesforce1 – Sample Hybrid App

Page 27: Dreamforce 2014 Mobile Theatre Session - Automated Testing for Salesforce1 Mobile Apps Using the Appium Framework

Salesforce1 – Hybrid App Automation Script Creation

Page 28: Dreamforce 2014 Mobile Theatre Session - Automated Testing for Salesforce1 Mobile Apps Using the Appium Framework

Salesforce1 – Hybrid App Automation Script Execution

Page 29: Dreamforce 2014 Mobile Theatre Session - Automated Testing for Salesforce1 Mobile Apps Using the Appium Framework

Automation Best Practices

• Test Early, Test Often

• Positive, Negative, Edge, Bulk Cases

• Reports & Statistics

• Avoid debugs, SOPs, code cluttering • TDD

Page 30: Dreamforce 2014 Mobile Theatre Session - Automated Testing for Salesforce1 Mobile Apps Using the Appium Framework

Automation Best Practices

Page 31: Dreamforce 2014 Mobile Theatre Session - Automated Testing for Salesforce1 Mobile Apps Using the Appium Framework

Continuous Integration – Putting It All Together!

• Hook up your scripts with a CI Tool such as –  Jenkins –  CloudBees –  CircleCI –  CISimple

• Report on your automated tests using a tool such as –  TestNG + ReportNG

• Analyse your test results using a framework such as

- New Relic

Page 32: Dreamforce 2014 Mobile Theatre Session - Automated Testing for Salesforce1 Mobile Apps Using the Appium Framework

Summary

• Download & Setup Mobile SDK • Go over Sample App Code • Download & Setup Appium • Record Your Scripts • Play Your Scripts • Put them into a Maven Project • Hook it up to your CI Server • Boom – You’re all set to automate your Salesforce1 native & hybrid apps!

Page 33: Dreamforce 2014 Mobile Theatre Session - Automated Testing for Salesforce1 Mobile Apps Using the Appium Framework

Q&A

Questions?

Page 34: Dreamforce 2014 Mobile Theatre Session - Automated Testing for Salesforce1 Mobile Apps Using the Appium Framework