designing an effective hybrid apps automation framework
Post on 06-Aug-2015
257 Views
Preview:
TRANSCRIPT
Best practices to design an hybrid-app automation framework with today’s de-facto standards: WebDriver, Selenium and Appium.
DESIGNING AN EFFECTIVE HYBRID APPS AUTOMATION FRAMEWORK
Andrea Tino
#test #hybrid-apps #selenium#webdriver #appium #automation
The testing series
This is NOT
What’s in the box...
This isAn overview about most recent technologies in hybrid apps testing and automation!
A tutorial to set up a working environment!
ACTORS & STAGESThe world of hybrid apps development and testing
is made of some different products that today form a real platform available for everyone.
Since one picture is worth a thousand words, the situation today is depicted here!
W3C
Selenium
WebDriver specification
publishes & updates
Selenium Team Appium
implements
develops based on
Appium Teamdevelops
Appium drivers
App testers
develops
usedevelop
Tests
execute on
Browsers & devices
use
use
What do we aim for?
So...
High business impact and value through testing...
...with the least effort!
TWO FACES OF THE SAME COINSelenium and Appium are not two different things, they actually work to reach the same objective.
WebDriver C# Java Javascript...JSON over HTTP
Selenium
Test server
Windows Android iOSFirefox
Firefox driver
Chrome
Chrome driver
Spartan
Spartan driver
Safari
Safari driver
Appium
WHY NOT HAVING BOTH?Selenium and Appium are not two different things, they
actually work to reach the same objective.
Selenium can achieve running the same test n all major browsers!
On browsers
Selenium Appium
Appium can achieve running the same test on all major platforms!
On devicesSame test can run on browsers and devices thanks to unique API!
Together
CODE ONCE, TEST FOR ALL!The key strategy is taking advantage of Selenium and
Appium in order to have tests be executed everywhere!
We must aim at building an infrastructure execute every test on all browsers and devices our application must support.
Target: multiplatform
Tests Test server
develop
DevicesBrowsers
executes on
send commands
to
send commands
to
C#JAVAJS
RUBY
TestersWeb
applications
targeting
BUILD THE ABSTRACTION LAYERSelenium and Appium are two different products, however they are compatible!
Automation abstraction
Implemented by the user to abstract Selenium and Appium.
Appium Server
Browsers Devices Simulators
Automation
Selenium API
Provides all functions to get access to elements and other resources in
the web application.
Appium API
Since Selenium and Appium are both based on WebDriver, it is possible to create an abstraction layer.
WebDriver does the trick
Build a thin layer that your tests will use in order to abstract lower logic. Like this a test will not know whether it is automating a browser or an app!
Objective
BUILDING AN AUTOMATION FRAMEWORKOnce your abstraction is ready, you need to build a testing
framework which executes your tests on all platforms.
Tests: platform agnostic
The engine will deal with platform specific API.
Configurable engine
Which platforms? How many times?
Having a single test be executed as many times as many platforms are supported by the application!
Objective
PCs Tablets Phones
Automation engine
feeded to
Test suite
tested against
The EndTHANK YOUTwitter: @_atinoE-Mail: andry.tino@hotmail.com
This work is distributed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International license.
Cover and 2nd page: illustration from the Appleseed Saga by Masamune Shiro.
This work includes edited arts by Microsoft Clip Art.
This work includes icons and graphics designed by Freepik.com.
May - June 2015v1.0
top related