SlideShare a Scribd company logo
Develop Automation
Testing using JavaScript
Agenda
• Contents
– Automate Website Testing
– Automate Mobile Web Testing
– Automate Mobile App Testing
– Automate Electron Desktop App Testing
• Q&As
2
Web Automation Testing
• Selected tool for browser automation
– WebDriverIO
• Selected testing framework
– Mocha
• Selected Assertion Library
– Chai
3
Web Automation Testing
4
WebDriverIO
• Selenium 2.0 bindings for NodeJS
• Control a browser or a mobile application
• Your test code will look simple, concise and easy to read
• A simple setup for a wdio test suite with page objects
• Support Selenium Standalone service to run Selenium
seamlessly when running tests with the WDIO testrunner
5
WebDriverIO
6
WebDriverIO
• Is easy to config
7
Test Framework
• Mocha is a feature-rich JavaScript test
framework running on Node.js and in the
browser, making asynchronous testing simple
and fun.
• Mocha tests run serially, allowing for flexible
and accurate reporting, while mapping
uncaught exceptions to the correct test
cases.
8
Test Framework
9
Chai Assertion Library
• Is BDD (Behavior-driven development ) / TDD
(Test-driven development) assertion library for
node & the browser
• Verify the conditions of the test and decide
whether test has failed or passed.
• Three different assertion styles
–The Expect / Should API covers the BDD
assertion styles.
–The Assert API covers the TDD assertion style.
10
Mobile Automation Testing
• Selected test automation tool
– Appium
• Selected language to write tests
– JavaScript
11
Mobile Automation Testing
What is Appium?
Appium Architecture
How Appium works in iOS?
How Appium works in Android?
12
What is Appium?
• Cross-platform test automation tool for
native, hybrid and mobile web apps, tested
on
– simulators (iOS, FirefoxOS)
– emulators (Android)
– real devices (iOS, Android, FirefoxOS)
• Is open source
13
Appium Architecture
14
Appium Architecture
15
Inspect Element Tools
• UIAutomatorViewer - Android
– packaged with Android sdk
– is present under “tools” folder
• Appium Inspector (both Android & iOS)
• Purpose: Inspect the UI of an application in
order to find the layout hierarchy, and
view the properties associated with the
controls
16
Executing Test
Android
• Real Devices
• Genymotion
Emulator
iOS
• Real Devices
• Simulator (as part
of the Xcode tools)
17
Desktop Automation Testing
• Only Application is built by Electron
• Selected test automation tool
– Spectron tool
18
ELECTRON
• Build cross platform desktop apps with
JavaScript, HTML, and CSS
19
• An open source framework for easily
writing integrations tests for your Electron
app.
• Spectron sets up and tears down your app
and allows it to be test-driven remotely
with full support for the Electron APIs.
• Built on top of ChromeDriver and
WebDriverIO.
20
Tools & Technologies
• WebDriverIO - Selenium 2.0 bindings for
NodeJS
• Appium - An open-source tool for
automating native, mobile web, and hybrid
applications on iOS and Android platforms.
• Spectron - An Electron Testing Framework
• Mocha - Test Framework
• Chai - Assertion Library
21
Q & A
Thank You
Khanh Do
Make Presentation much more fun

More Related Content

What's hot (20)

PDF
Carmen Popoviciu - Protractor styleguide | Codemotion Milan 2015
Codemotion
 
PDF
UI Testing Automation
AgileEngine
 
PDF
Front-End Testing: Demystified
Seth McLaughlin
 
PPTX
Automated Smoke Tests with Protractor
🌱 Dale Spoonemore
 
PPTX
Better End-to-End Testing with Page Objects Model using Protractor
Kasun Kodagoda
 
PPTX
Protractor Tutorial Quality in Agile 2015
Andrew Eisenberg
 
PDF
Testing with Codeception
Jeremy Coates
 
PPTX
Selenium for Jobseekers
Seshu Madhav Chaturvedula
 
PPTX
Using protractor to build automated ui tests
🌱 Dale Spoonemore
 
PPTX
Protractor Testing Automation Tool Framework / Jasmine Reporters
Haitham Refaat
 
PPTX
Protractor training
Sergiy Stotskiy
 
PPTX
UI Testing Automation - Alex Kalinovsky - CreamTec LLC
Jim Lane
 
PPTX
CI / CD w/ Codeception
Tudor Barbu
 
PPTX
Presentation_Protractor
Umesh Randhe
 
PDF
Testing with Codeception (Webelement #30)
Adam Štipák
 
PPTX
Step by step - Selenium 3 web-driver - From Scratch
Haitham Refaat
 
PPTX
Automated UI testing done right (DDDSydney)
Mehdi Khalili
 
PPTX
Test automation with php codeception
buddhieash
 
PDF
Test-driven Development with Drupal and Codeception (DrupalCamp Brighton)
Cogapp
 
PDF
Selenium Testing on Chrome - Google DevFest Armenia 2015
Sargis Sargsyan
 
Carmen Popoviciu - Protractor styleguide | Codemotion Milan 2015
Codemotion
 
UI Testing Automation
AgileEngine
 
Front-End Testing: Demystified
Seth McLaughlin
 
Automated Smoke Tests with Protractor
🌱 Dale Spoonemore
 
Better End-to-End Testing with Page Objects Model using Protractor
Kasun Kodagoda
 
Protractor Tutorial Quality in Agile 2015
Andrew Eisenberg
 
Testing with Codeception
Jeremy Coates
 
Selenium for Jobseekers
Seshu Madhav Chaturvedula
 
Using protractor to build automated ui tests
🌱 Dale Spoonemore
 
Protractor Testing Automation Tool Framework / Jasmine Reporters
Haitham Refaat
 
Protractor training
Sergiy Stotskiy
 
UI Testing Automation - Alex Kalinovsky - CreamTec LLC
Jim Lane
 
CI / CD w/ Codeception
Tudor Barbu
 
Presentation_Protractor
Umesh Randhe
 
Testing with Codeception (Webelement #30)
Adam Štipák
 
Step by step - Selenium 3 web-driver - From Scratch
Haitham Refaat
 
Automated UI testing done right (DDDSydney)
Mehdi Khalili
 
Test automation with php codeception
buddhieash
 
Test-driven Development with Drupal and Codeception (DrupalCamp Brighton)
Cogapp
 
Selenium Testing on Chrome - Google DevFest Armenia 2015
Sargis Sargsyan
 

Similar to Automation using Javascript (20)

PDF
Automating Mobile Applications
April Luk
 
PPTX
Developing Hybrid Applications with IONIC
Fuat Buğra AYDIN
 
PDF
Mobile Application Development FRAMEWORKS AND TOOLS.pdf
snhs88
 
PPTX
Appium.pptx
SameerAlam82
 
PPTX
Mobile Testing Challenges Lighting Talk with www.softtest.ie
David O'Dowd
 
PPTX
Android Automation Testing with Selendroid
Vikas Thange
 
PDF
automation framework
ANSHU GOYAL
 
PPTX
.NET? MonoDroid Does
Kevin McMahon
 
PPTX
Advanced Appium
Dan Cuellar
 
PPTX
Building mobile apps using meteorJS
Entrepreneur / Startup
 
PPTX
Appium Meetup #2 - Mobile Web Automation Introduction
snevesbarros
 
PPTX
Selenium presentation
shivani thakur
 
PPTX
Xamarin.Forms Bootcamp
Mike Melusky
 
PPTX
DeveloperDeveloperDeveloper! Sydney 2012
kittenthecat
 
PPTX
Ios driver presentation copy
David O'Dowd
 
PPTX
ATAGTR2017 Appium
Agile Testing Alliance
 
PPTX
Automated Testing – Web, Mobile, Desktop - Challenges and Successes
Ted Drake
 
PPT
Android Application Development Using Java
amaankhan
 
PPTX
Hybrid Mobile Development with Apache Cordova and Java EE 7 (JavaOne 2014)
Ryan Cuprak
 
PDF
Automated Testing in DevOps
Haufe-Lexware GmbH & Co KG
 
Automating Mobile Applications
April Luk
 
Developing Hybrid Applications with IONIC
Fuat Buğra AYDIN
 
Mobile Application Development FRAMEWORKS AND TOOLS.pdf
snhs88
 
Appium.pptx
SameerAlam82
 
Mobile Testing Challenges Lighting Talk with www.softtest.ie
David O'Dowd
 
Android Automation Testing with Selendroid
Vikas Thange
 
automation framework
ANSHU GOYAL
 
.NET? MonoDroid Does
Kevin McMahon
 
Advanced Appium
Dan Cuellar
 
Building mobile apps using meteorJS
Entrepreneur / Startup
 
Appium Meetup #2 - Mobile Web Automation Introduction
snevesbarros
 
Selenium presentation
shivani thakur
 
Xamarin.Forms Bootcamp
Mike Melusky
 
DeveloperDeveloperDeveloper! Sydney 2012
kittenthecat
 
Ios driver presentation copy
David O'Dowd
 
ATAGTR2017 Appium
Agile Testing Alliance
 
Automated Testing – Web, Mobile, Desktop - Challenges and Successes
Ted Drake
 
Android Application Development Using Java
amaankhan
 
Hybrid Mobile Development with Apache Cordova and Java EE 7 (JavaOne 2014)
Ryan Cuprak
 
Automated Testing in DevOps
Haufe-Lexware GmbH & Co KG
 
Ad

Recently uploaded (20)

PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
PDF
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
PDF
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
PPTX
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
PDF
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PDF
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PPTX
Designing_the_Future_AI_Driven_Product_Experiences_Across_Devices.pptx
presentifyai
 
PDF
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
DOCX
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
PPTX
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
PDF
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
PDF
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
PDF
Staying Human in a Machine- Accelerated World
Catalin Jora
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
Designing_the_Future_AI_Driven_Product_Experiences_Across_Devices.pptx
presentifyai
 
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
Staying Human in a Machine- Accelerated World
Catalin Jora
 
Ad

Automation using Javascript

  • 2. Agenda • Contents – Automate Website Testing – Automate Mobile Web Testing – Automate Mobile App Testing – Automate Electron Desktop App Testing • Q&As 2
  • 3. Web Automation Testing • Selected tool for browser automation – WebDriverIO • Selected testing framework – Mocha • Selected Assertion Library – Chai 3
  • 5. WebDriverIO • Selenium 2.0 bindings for NodeJS • Control a browser or a mobile application • Your test code will look simple, concise and easy to read • A simple setup for a wdio test suite with page objects • Support Selenium Standalone service to run Selenium seamlessly when running tests with the WDIO testrunner 5
  • 8. Test Framework • Mocha is a feature-rich JavaScript test framework running on Node.js and in the browser, making asynchronous testing simple and fun. • Mocha tests run serially, allowing for flexible and accurate reporting, while mapping uncaught exceptions to the correct test cases. 8
  • 10. Chai Assertion Library • Is BDD (Behavior-driven development ) / TDD (Test-driven development) assertion library for node & the browser • Verify the conditions of the test and decide whether test has failed or passed. • Three different assertion styles –The Expect / Should API covers the BDD assertion styles. –The Assert API covers the TDD assertion style. 10
  • 11. Mobile Automation Testing • Selected test automation tool – Appium • Selected language to write tests – JavaScript 11
  • 12. Mobile Automation Testing What is Appium? Appium Architecture How Appium works in iOS? How Appium works in Android? 12
  • 13. What is Appium? • Cross-platform test automation tool for native, hybrid and mobile web apps, tested on – simulators (iOS, FirefoxOS) – emulators (Android) – real devices (iOS, Android, FirefoxOS) • Is open source 13
  • 16. Inspect Element Tools • UIAutomatorViewer - Android – packaged with Android sdk – is present under “tools” folder • Appium Inspector (both Android & iOS) • Purpose: Inspect the UI of an application in order to find the layout hierarchy, and view the properties associated with the controls 16
  • 17. Executing Test Android • Real Devices • Genymotion Emulator iOS • Real Devices • Simulator (as part of the Xcode tools) 17
  • 18. Desktop Automation Testing • Only Application is built by Electron • Selected test automation tool – Spectron tool 18
  • 19. ELECTRON • Build cross platform desktop apps with JavaScript, HTML, and CSS 19
  • 20. • An open source framework for easily writing integrations tests for your Electron app. • Spectron sets up and tears down your app and allows it to be test-driven remotely with full support for the Electron APIs. • Built on top of ChromeDriver and WebDriverIO. 20
  • 21. Tools & Technologies • WebDriverIO - Selenium 2.0 bindings for NodeJS • Appium - An open-source tool for automating native, mobile web, and hybrid applications on iOS and Android platforms. • Spectron - An Electron Testing Framework • Mocha - Test Framework • Chai - Assertion Library 21
  • 22. Q & A
  • 23. Thank You Khanh Do Make Presentation much more fun