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
Ad

Recommended

Automated Testing using JavaScript
Automated Testing using JavaScript
Simon Guest
 
Automated Web Testing using JavaScript
Automated Web Testing using JavaScript
Simon Guest
 
Protractor
Protractor
kapilsethi9
 
Jellyfish, JSCONF 2011
Jellyfish, JSCONF 2011
Adam Christian
 
Protractor overview
Protractor overview
Abhishek Yadav
 
AngularJS and Protractor
AngularJS and Protractor
Filipe Falcão
 
Protractor for angularJS
Protractor for angularJS
Krishna Kumar
 
Introduction to Protractor
Introduction to Protractor
Florian Fesseler
 
Carmen Popoviciu - Protractor styleguide | Codemotion Milan 2015
Carmen Popoviciu - Protractor styleguide | Codemotion Milan 2015
Codemotion
 
UI Testing Automation
UI Testing Automation
AgileEngine
 
Front-End Testing: Demystified
Front-End Testing: Demystified
Seth McLaughlin
 
Automated Smoke Tests with Protractor
Automated Smoke Tests with Protractor
🌱 Dale Spoonemore
 
Better End-to-End Testing with Page Objects Model using Protractor
Better End-to-End Testing with Page Objects Model using Protractor
Kasun Kodagoda
 
Protractor Tutorial Quality in Agile 2015
Protractor Tutorial Quality in Agile 2015
Andrew Eisenberg
 
Testing with Codeception
Testing with Codeception
Jeremy Coates
 
Selenium for Jobseekers
Selenium for Jobseekers
Seshu Madhav Chaturvedula
 
Using protractor to build automated ui tests
Using protractor to build automated ui tests
🌱 Dale Spoonemore
 
Protractor Testing Automation Tool Framework / Jasmine Reporters
Protractor Testing Automation Tool Framework / Jasmine Reporters
Haitham Refaat
 
Protractor training
Protractor training
Sergiy Stotskiy
 
UI Testing Automation - Alex Kalinovsky - CreamTec LLC
UI Testing Automation - Alex Kalinovsky - CreamTec LLC
Jim Lane
 
CI / CD w/ Codeception
CI / CD w/ Codeception
Tudor Barbu
 
Presentation_Protractor
Presentation_Protractor
Umesh Randhe
 
Testing with Codeception (Webelement #30)
Testing with Codeception (Webelement #30)
Adam Štipák
 
Step by step - Selenium 3 web-driver - From Scratch
Step by step - Selenium 3 web-driver - From Scratch
Haitham Refaat
 
Automated UI testing done right (DDDSydney)
Automated UI testing done right (DDDSydney)
Mehdi Khalili
 
Test automation with php codeception
Test automation with php codeception
buddhieash
 
Test-driven Development with Drupal and Codeception (DrupalCamp Brighton)
Test-driven Development with Drupal and Codeception (DrupalCamp Brighton)
Cogapp
 
Selenium Testing on Chrome - Google DevFest Armenia 2015
Selenium Testing on Chrome - Google DevFest Armenia 2015
Sargis Sargsyan
 
A Step-by-Step Guide to Test Automation with Appium.pdf
A Step-by-Step Guide to Test Automation with Appium.pdf
flufftailshop
 
Mobile automation testing with selenium and appium
Mobile automation testing with selenium and appium
BugRaptors
 

More Related Content

What's hot (20)

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

Similar to Automation using Javascript (20)

A Step-by-Step Guide to Test Automation with Appium.pdf
A Step-by-Step Guide to Test Automation with Appium.pdf
flufftailshop
 
Mobile automation testing with selenium and appium
Mobile automation testing with selenium and appium
BugRaptors
 
Automating Mobile Web Browsers with Appium.pdf
Automating Mobile Web Browsers with Appium.pdf
flufftailshop
 
Mobile Automation with Appium
Mobile Automation with Appium
Manoj Kumar Kumar
 
appiumpresent-211128171811.pptx projet de presentation
appiumpresent-211128171811.pptx projet de presentation
EnochBidima3
 
Appium Presentation
Appium Presentation
OmarUsman6
 
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
kalichargn70th171
 
Decoding Appium No-Code Test Automation With HeadSpin.pdf
Decoding Appium No-Code Test Automation With HeadSpin.pdf
kalichargn70th171
 
Appium.pptx
Appium.pptx
SameerAlam82
 
Codeless Automation Testing - All you need to know.pdf
Codeless Automation Testing - All you need to know.pdf
kalichargn70th171
 
Codeless Automation Testing - All you need to know.pdf
Codeless Automation Testing - All you need to know.pdf
kalichargn70th171
 
How to Test Android and iOS Mobile Apps with Appium.pdf
How to Test Android and iOS Mobile Apps with Appium.pdf
kalichargn70th171
 
Codeless Automation Testing - All you need to know.pdf
Codeless Automation Testing - All you need to know.pdf
flufftailshop
 
Automation Testing With Appium
Automation Testing With Appium
Knoldus Inc.
 
Automated Mobile Testing using Appium.pdf
Automated Mobile Testing using Appium.pdf
Anand722237
 
Appium testing api
Appium testing api
b4usolution .
 
Appium - test automation for mobile apps
Appium - test automation for mobile apps
Aleksejs Trescalins
 
How to Leverage Appium in Your Mobile App Testing
How to Leverage Appium in Your Mobile App Testing
Bitbar
 
Appium workshop technopark trivandrum
Appium workshop technopark trivandrum
Syam Sasi
 
Appium Interview Questions and Answers | Edureka
Appium Interview Questions and Answers | Edureka
Edureka!
 
A Step-by-Step Guide to Test Automation with Appium.pdf
A Step-by-Step Guide to Test Automation with Appium.pdf
flufftailshop
 
Mobile automation testing with selenium and appium
Mobile automation testing with selenium and appium
BugRaptors
 
Automating Mobile Web Browsers with Appium.pdf
Automating Mobile Web Browsers with Appium.pdf
flufftailshop
 
Mobile Automation with Appium
Mobile Automation with Appium
Manoj Kumar Kumar
 
appiumpresent-211128171811.pptx projet de presentation
appiumpresent-211128171811.pptx projet de presentation
EnochBidima3
 
Appium Presentation
Appium Presentation
OmarUsman6
 
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
kalichargn70th171
 
Decoding Appium No-Code Test Automation With HeadSpin.pdf
Decoding Appium No-Code Test Automation With HeadSpin.pdf
kalichargn70th171
 
Codeless Automation Testing - All you need to know.pdf
Codeless Automation Testing - All you need to know.pdf
kalichargn70th171
 
Codeless Automation Testing - All you need to know.pdf
Codeless Automation Testing - All you need to know.pdf
kalichargn70th171
 
How to Test Android and iOS Mobile Apps with Appium.pdf
How to Test Android and iOS Mobile Apps with Appium.pdf
kalichargn70th171
 
Codeless Automation Testing - All you need to know.pdf
Codeless Automation Testing - All you need to know.pdf
flufftailshop
 
Automation Testing With Appium
Automation Testing With Appium
Knoldus Inc.
 
Automated Mobile Testing using Appium.pdf
Automated Mobile Testing using Appium.pdf
Anand722237
 
Appium - test automation for mobile apps
Appium - test automation for mobile apps
Aleksejs Trescalins
 
How to Leverage Appium in Your Mobile App Testing
How to Leverage Appium in Your Mobile App Testing
Bitbar
 
Appium workshop technopark trivandrum
Appium workshop technopark trivandrum
Syam Sasi
 
Appium Interview Questions and Answers | Edureka
Appium Interview Questions and Answers | Edureka
Edureka!
 
Ad

Recently uploaded (20)

FME for Good: Integrating Multiple Data Sources with APIs to Support Local Ch...
FME for Good: Integrating Multiple Data Sources with APIs to Support Local Ch...
Safe Software
 
MuleSoft for AgentForce : Topic Center and API Catalog
MuleSoft for AgentForce : Topic Center and API Catalog
shyamraj55
 
vertical-cnc-processing-centers-drillteq-v-200-en.pdf
vertical-cnc-processing-centers-drillteq-v-200-en.pdf
AmirStern2
 
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
biswajitbanerjee38
 
AI VIDEO MAGAZINE - June 2025 - r/aivideo
AI VIDEO MAGAZINE - June 2025 - r/aivideo
1pcity Studios, Inc
 
Viral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Viral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Puppy jhon
 
Kubernetes Security Act Now Before It’s Too Late
Kubernetes Security Act Now Before It’s Too Late
Michael Furman
 
“Why It’s Critical to Have an Integrated Development Methodology for Edge AI,...
“Why It’s Critical to Have an Integrated Development Methodology for Edge AI,...
Edge AI and Vision Alliance
 
SAP Modernization Strategies for a Successful S/4HANA Journey.pdf
SAP Modernization Strategies for a Successful S/4HANA Journey.pdf
Precisely
 
OWASP Barcelona 2025 Threat Model Library
OWASP Barcelona 2025 Threat Model Library
PetraVukmirovic
 
FIDO Alliance Seminar State of Passkeys.pptx
FIDO Alliance Seminar State of Passkeys.pptx
FIDO Alliance
 
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Alliance
 
Raman Bhaumik - Passionate Tech Enthusiast
Raman Bhaumik - Passionate Tech Enthusiast
Raman Bhaumik
 
High Availability On-Premises FME Flow.pdf
High Availability On-Premises FME Flow.pdf
Safe Software
 
Securing Account Lifecycles in the Age of Deepfakes.pptx
Securing Account Lifecycles in the Age of Deepfakes.pptx
FIDO Alliance
 
Can We Use Rust to Develop Extensions for PostgreSQL? (POSETTE: An Event for ...
Can We Use Rust to Develop Extensions for PostgreSQL? (POSETTE: An Event for ...
NTT DATA Technology & Innovation
 
Providing an OGC API Processes REST Interface for FME Flow
Providing an OGC API Processes REST Interface for FME Flow
Safe Software
 
Floods in Valencia: Two FME-Powered Stories of Data Resilience
Floods in Valencia: Two FME-Powered Stories of Data Resilience
Safe Software
 
National Fuels Treatments Initiative: Building a Seamless Map of Hazardous Fu...
National Fuels Treatments Initiative: Building a Seamless Map of Hazardous Fu...
Safe Software
 
TrustArc Webinar - 2025 Global Privacy Survey
TrustArc Webinar - 2025 Global Privacy Survey
TrustArc
 
FME for Good: Integrating Multiple Data Sources with APIs to Support Local Ch...
FME for Good: Integrating Multiple Data Sources with APIs to Support Local Ch...
Safe Software
 
MuleSoft for AgentForce : Topic Center and API Catalog
MuleSoft for AgentForce : Topic Center and API Catalog
shyamraj55
 
vertical-cnc-processing-centers-drillteq-v-200-en.pdf
vertical-cnc-processing-centers-drillteq-v-200-en.pdf
AmirStern2
 
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
biswajitbanerjee38
 
AI VIDEO MAGAZINE - June 2025 - r/aivideo
AI VIDEO MAGAZINE - June 2025 - r/aivideo
1pcity Studios, Inc
 
Viral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Viral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Puppy jhon
 
Kubernetes Security Act Now Before It’s Too Late
Kubernetes Security Act Now Before It’s Too Late
Michael Furman
 
“Why It’s Critical to Have an Integrated Development Methodology for Edge AI,...
“Why It’s Critical to Have an Integrated Development Methodology for Edge AI,...
Edge AI and Vision Alliance
 
SAP Modernization Strategies for a Successful S/4HANA Journey.pdf
SAP Modernization Strategies for a Successful S/4HANA Journey.pdf
Precisely
 
OWASP Barcelona 2025 Threat Model Library
OWASP Barcelona 2025 Threat Model Library
PetraVukmirovic
 
FIDO Alliance Seminar State of Passkeys.pptx
FIDO Alliance Seminar State of Passkeys.pptx
FIDO Alliance
 
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Alliance
 
Raman Bhaumik - Passionate Tech Enthusiast
Raman Bhaumik - Passionate Tech Enthusiast
Raman Bhaumik
 
High Availability On-Premises FME Flow.pdf
High Availability On-Premises FME Flow.pdf
Safe Software
 
Securing Account Lifecycles in the Age of Deepfakes.pptx
Securing Account Lifecycles in the Age of Deepfakes.pptx
FIDO Alliance
 
Can We Use Rust to Develop Extensions for PostgreSQL? (POSETTE: An Event for ...
Can We Use Rust to Develop Extensions for PostgreSQL? (POSETTE: An Event for ...
NTT DATA Technology & Innovation
 
Providing an OGC API Processes REST Interface for FME Flow
Providing an OGC API Processes REST Interface for FME Flow
Safe Software
 
Floods in Valencia: Two FME-Powered Stories of Data Resilience
Floods in Valencia: Two FME-Powered Stories of Data Resilience
Safe Software
 
National Fuels Treatments Initiative: Building a Seamless Map of Hazardous Fu...
National Fuels Treatments Initiative: Building a Seamless Map of Hazardous Fu...
Safe Software
 
TrustArc Webinar - 2025 Global Privacy Survey
TrustArc Webinar - 2025 Global Privacy Survey
TrustArc
 
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