Everything You Need To Know about Appium and Selenium

  • View
    158

  • Download
    0

Embed Size (px)

Text of Everything You Need To Know about Appium and Selenium

PowerPoint Presentation

Perfecto Mobile CQ LabSelenium & AppiumIntro and Demo for PartnersDavid BroermanPartner Enablement ManagerPhone: 727. 225.2826 / Email: davidb@perfectomobile.com

1

AgendaIntro to PerfectoUnderstanding the CQ Lab - Basic Architecture/SetupAutomation TestingHigh Level Overview of Selenium/Appium & how Perfecto fits inMobile Application TypesObject TreesDemoSelenium RemoteWebDriver/Appium Basic prerequisitesProject Creation, Script Creation/Review and Execution (Java/Eclipse)Review Execution Report

Before getting started with the technical implementation of our solution, lets begin with an introduction to the types of mobile applications, and automation testing using Selenium RWD and Appium.Next we will take a look at the Perfecto Mobile RWD extension to mobile devices (for web and hybrid applications) and Appium implementation (for native applications).2

Intro to PerfectoDominant leader & visionaryStrong EcosystemPerfecto @ a glancePartnering with Enterprises and their System Integration Partners to deliver exceptional digital experiences.Perfecto Mobile marks shift in mobile apps QA with Continuous Quality Lab3Setting the bar for market success

Founded in late 2006, Business HQ in Boston Over 300 employees globallyFortune 500 customer base

8/16/2016Cloud Based Continuous Quality Lab enabling testing and monitoring of all digital platforms on real devices and real end user conditions, for enterprises adopting agile delivery processes.Perfecto Offers

3

Dev Environments

Cloud Based Quality Platform For The Digital EraAny IDE

Any test frameworkAny CI serverAny test tool

User Condition Testing Layer

Functional Testing

Performance Testing

Quality in Production

Customer Support

One Lab for all Digital Platforms

CodeTestProductionSupport

Continuous Quality Reporting

4

Open and Integrated5

Open & IntegratedLanguages

IDEFrameworksCI Servers

Xcode

Selenium8/16/2016

Slide objective Perfecto is committed to helping enterprises leverage existing practices, assets and expertise

Perfecto Mobile strives integrate with popular tools used by enterprises. Customers can leverage existing assets and expertise . Our support for various tools is constantly expanding. Some customers also take advantage of our published API to create custom extensions to different frameworks.

Paypals integrated the open source Project Nemo, selenium-webdriver automation for node.js, using the API to provide its DevTest teams a tailor fit Java Script environment.

5

Automation Testing, Mobile Application Types and Objects

How does it work?6

Automation TestingSelenium RemoteWebDriverOpen Source Automation Framework for automating browser testingPerfecto Mobile extends Selenium to support mobile device browsers and appsMulti-language and IDE supportAppiumAims to automate any mobile app from any language and any test frameworkOpen Source - Extends Selenium for native (also hybrid applications)Supports iOS and AndroidMulti-language and IDE supportPerfectoTesting on real devices in the cloudReal End User ConditionsPerfecto Mobile proprietary functionalities (not available in Selenium/Appium)GPS Location, Device Vitals, Network Virtualization

focus on two testing environments, supported by Perfecto Mobile: Selenium RemoteWebDriver and Appium.Selenium RemoteWebDriver Selenium is an open-source tool used for automating browser testing.(For more advanced users, familiar with WebDriver: RemoteWebDriveris animplementation class of theWebDriverinterface that a test script developer can use to execute their test scripts via theRemoteWebDriverserver on a remote machine.)Perfecto Mobile has extended RemoteWebDriver to support mobile web and hybrid applications (in the Perfecto Mobile Continuous Quality Lab CQ Lab).Language support includes Java, Ruby, Python, C#... AppiumAppium is an open-source automation testing framework that is based on the Selenium WebDriver; thats extended with new classes to support mobile application testing. It contains specific classes for iOS and Android application testing.Perfecto Mobile supports the complete suite of Appium tools, in the CQ Lab, making it an Enterprise Grade Quality Solution. Also, Perfecto Mobile has extended the support to include proprietary Perfecto Mobile functionalities (that are not available in Selenium).

7

Why was Selenium named Selenium?Selenium was originally created as an alternative to Mercury Interactives QuickTest Professional (now known as UFT) The remedy for Mercury poisoning is Selenium!

Selenium is an open source test engine that supports testing web based applications on desktop and mobile device browsers

8

Mobile Application TypesStandard testing tool sets

Use Selenium RWD for web applications

Use Appium for native apps

Use Selenium RWD for hybrid apps (can also use Appium)

As we have already established, there are three types of mobile applications Web (regular/mobile browsers), Hybrid and Native.

The standard Selenium RemoteWebDriver allows us to test desktop browsers; and Perfecto Mobile has extended this to include browsers running on mobile devices.

Perfecto Mobile recommends using:Selenium RemoteWebDriver for testing web applications (regular and mobile browsers)Appium for native applications, and Selenium RemoteWebDriver for hybrid applications

9

Perfecto Mobile Enterprise GradeComplete SDLC (Manual, Automation, APM)Customer Support (24x7), NOC, SLAsCQL, Continuously up to dateEnterprise Security, SSO, Governance, Private CloudsPerfecto Mobile Environmental Capabilities

Network Virtualization/ ProfilesLarge scale labDaaSHybrid Cloud solutionSingle user performanceDevice and App VitalsGPS InjectionDevice logsGlobal device coverage, real carriersPerfecto Mobile - AutomationBoth visual & Native objectsTesting connects to a CQL Always OnRich Media reportsParallel ExecutionCI ReadyUnattended TestPerfecto Mobile Appium Test Framework CoverageAppium Test FrameworkLocal Devices Only Not a Test LabNative Objects Only, No Visual AnalysisIn App Testing, No System Level Breaks CIOnly Automation Solution (No Manual, No APM)Not enterprise grade Security (local testing)Community DrivenLimited SupportNo end-user environments Very basic test reportsNo support modelCustomers manage device issues

10

Website & Apps Object Trees/Identifying ObjectsWeb ObjectsDOMSame Tree (PM or Appium)Native App ObjectsPM or Appium frameworkSeparate naming for Android and iOSHybrid ApplicationPM automation frameworkMix of Native and DOM objects

DOM

Perfecto Mobile

Appium

Identifying objects on the different types of mobile applications can be done in many ways. In this course we will focus on using the following frameworks, according to Perfecto Mobile best practices:the DOM objects for testing web applicationsAppium framework for testing Native applications, andthe Perfecto Mobile framework for testing hybrid applications

This enables us to find, view properties, and perform interactions on the application using objects (such as a clicking on something on the device screen, selecting an image or text element, and setting text to an edit field).

(For beginner users, a little more about identifying objects:Application User Interfaces are drawn to the screen based on a definition (thats provided by the application) of how and where to draw the different UI Elements. The definition is a hierarchy of available UI Elements that can be described as an Object Tree.

The Object Tree for Web applications uses a standard set of UI Element types to describe how to draw the User Interface. This is the DOM tree and the UI Elements in the standard can be used to describe any website or web application.)

The Perfecto Mobile and Appium Frameworks:In the world of mobile applications, it is not as simple. Apple has its own proprietary set of UI Elements and this is different from the proprietary set used by Android. Perfecto Mobile created a framework that allows us to translate the competing UI Elements of the different application UI sets into a canonical set of UI Elements and describe the UI structure of an application using these generic UI Elements. This is the Perfecto Mobile framework Object Tree.

Appium, that we will be using in the latter part of the course to test native apps, references the UI Elements using the names provided by the proprietary description files. This is the Appium framework Object Tree.

The Perfecto Mobile framework identifies the objects in the application with the same standard. This means that the object tree representation of the elements will be the same on both iOS and Android applications.The Appium framework uses two different object tree representations UI Automator for Android and UI Automation for iOS. This means that when we develop our automation test, according to this mode of work, we will need to create two separate tests (one for Android and another for iOS).

(For advanced users, the Perfecto Mobile framework supports identification of the objects either with the application classes or based on a translated generic set of classes. This enables using the same objects for both Android and iOS applications, also referred to as ScriptOnce. This will be covered in later modules.)

The framework we choose to work with will determine the object tree representation, in XML format, that we see and work with when using the Perfecto Mobile Object Spy.

(For beginner users, each object is refined by a set of attributes that define what is actually displayed. For examp