SlideShare a Scribd company logo
Frameworks for Browser Automation Testing 
Luís A. Bastião Silva 
University of Aveiro 
DETI / IEETA 
bastiao@ua.pt
Outline 
• Motivation 
• Comparison between frameworks 
• Nightwatch.js 
– How it works? 
– How to write tests? 
– How to run the tests? 
• How to use in your project? 
• Demo
What is Browse Automating Tests? 
You can use it also to automate your daily tasks, if you are able to do it.. 
• Launch and automate your browser 
• Fill and submit forms 
• Click and follow links 
• Verify if the output is according of what 
you define.
Motivation 
• Often web developers changes in the interface, 
change the code, we fix bugs and add new 
features. 
• Sometimes it conduct to wrong results 
• Browser Compatibility - break functionality 
• Test with heterogeneous datasets 
4 
.. or in other words, why should I use Browse Automated Testing? 
Software developers are humans and they made 
mistakes. Developers can type: 
“id="buttob_searc” where should be 
“id=“button_search” – and it breaks the functionality. 
Browse automated tests can detect it!
Comparison between different 
frameworks 
Name Nightwatch.js Selenium Browsera dalekjs htmlunit watin sahipro venusjs 
OSS Yes Yes Paid Yes Yes Yes Paid Yes 
Activity High High Support Medium Low Low Support Medium 
WebDriver Yes Yes Yes Yes No No, IE only Yes Yes 
Jenkins* Medium Medium 
Automated 
tests, 
reports Medium Unknown Unknown 
Automated 
tests, 
reports Medium 
Feel free to contribute to this comparison: http://goo.gl/Vq3WeO 
Output 
Very good, 
JUnit 
Very good, 
JUnit 
Very good, 
UI 
Navigation Good Good Unknown 
Very good, 
UI 
Navigation Unknown 
Difficulty to 
write Easy 
Medium 
(syntax is 
not good) Easy Easy Verbose Easy Easy--- Easy 
Deployment Medium Medium Easy Medium Medium Easy Easy Medium 
Observations Selenium - - 
Docs not 
good - - - 
Developed by 
LinkedIn
Why nightwatch.js? 
• Easy to write tests 
• Github activity 
• Free 
• Good documentation 
• Supports IE ( we know that no one cares, but 
in the end everybody cares. ) 
• It is working now.  
• More info: 
– ~10k downloads/month 
– ~150 forks (github) 
– ~2300 stars (github)
Nightwatch.js architecture 
What are behind it? 
From: http://nightwatchjs.org/guide#theory-of-operation and http://www.slideshare.net/sethmcl/join-the-darkside-nightwatchjs
Directory structure 
How to start? What files should I have? How the test groups works? 
• Install: 
– $ npm install nightwatch 
– Run Selenium server 
• nightwatch.js 
– #!/usr/bin/env node 
– require('nightwatch/bin/runner.js'); 
• nightwatch.json 
• Tests/ 
– Login.js 
– Accounts/0001_landing_page.js 
– Accounts/0002_register.js 
– dashboard/0001_widgets.js 
– Your own structure, you define it!
Setup nightwatch.json
Test sample workflow 
1. Open Browser URL 
2. Locate the username field and fill it with 
“admin” 
3. Find the password field and fill it with 
“doNotGiveATry” 
4. Find the Login button and submit 
5. Verify the output to check if it successes. 
You need to know Javascript and how to use CSS or Xpath Selectors. 
You can learn about it here: http://www.w3.org/TR/CSS21/selector.html 
or http://www.w3schools.com/css/css_attribute_selectors.asp
Assertation or Verification 
• assert.title(‘automated tests rocks’) 
– If false, log failure and stop to run the test 
suite. 
• verification.title(‘automated tests rocks’) 
– If false, log failure and continue running the 
test suite.
What kind of assertations exists? 
• .assert.title(‘Catalogue’) 
• .assert.urlContains('done') 
• .assert.elementPresent('#results_size', ’0 
results') 
• css properties, … and more available!
How to run? 
• $ node nightwatch.js –-env=chrome 
• Windows you can test with ie: 
– $ node nightwatch.js –-env=chrome,ie, firefox 
• You can skip test groups: 
– $ node nightwatch –-env=chrome –-skip-group= 
accounts,dashboard 
• You can run the only ones that has a 
specific tag: 
– $ node nightwatch –-env=chrome –-tag=login
What the output it retrieves? 
Console output
What the output it retrieves? 
Junit format
Can I use it in my own project? 
Write tests? Nooooooooooooooo! 
• Is your project web? If yes: 
– Yes, you should. 
– We have a Windows machine up and running 
You can integrate Jenkins of the Bio group. 
– In some cases you may need to change the 
webapp to become the life easier. 
– You will avoid headaches in the future  
If you do NOT use Browse Automating Testing: 
Development 
stage 
Productio 
n User Feedback
Can I use it in my own project? 
Write tests? Easy life! But yes, you still spend time, but you win upfront. 
• Is your project web? If yes: 
– Yes, you should. 
– We have a Windows machine up and running 
You can integrate Jenkins of the Bio group. 
– In some cases you may need to change the 
webapp to become the life easier. 
– You will avoid headaches in the future  
If you do USE Browse Automating Testing: 
Development Productio 
Usenr Feedback 
Write Tests
Credits & References 
• Ricardo Ribeiro 
– He did the first steps in the nightwatch.js 
– Deployed the full solution in Windows 
environment 
– Write tests for EMIF Catalogue 
• http://nightwatchjs.org/ 
• http://www.slideshare.net/sethmcl/join-the- 
darkside-nightwatchjs 
• It will be available in my slideshare: 
– http://www.slideshare.net/bastiao
See it running… 
• EMIF Catalogue, let’s check the tests
Thanks for your attention! 
Luís A. Bastião Silva 
University of Aveiro 
DETI / IEETA 
bastiao@ua.pt

More Related Content

PPTX
Nightwatch JS for End to End Tests
PPTX
Maven tutorial
PPTX
How to Get Started with Cypress
PDF
git and github
PDF
Git Series. Episode 3. Git Flow and Github-Flow
PPT
React js
PDF
Unit Testing with Jest
Nightwatch JS for End to End Tests
Maven tutorial
How to Get Started with Cypress
git and github
Git Series. Episode 3. Git Flow and Github-Flow
React js
Unit Testing with Jest

What's hot (20)

PPTX
Git Lab Introduction
PPTX
Alfresco DevCon 2019 Performance Tools of the Trade
PPTX
Battle Of The Microservice Frameworks: Micronaut versus Quarkus edition!
PDF
Behavior-Driven Development and Automation Testing Using Cucumber Framework W...
PPTX
React Class Components vs Functional Components: Which is Better?
PDF
Create an architecture for web test automation
PPTX
Introduction to Maven
PPT
Git workflows presentation
PDF
Infrastructure & System Monitoring using Prometheus
PPTX
Android jetpack compose | Declarative UI
PDF
Gitlab flow solo
PPTX
Saving Time By Testing With Jest
PPTX
0 to 60 With Outsystems
PDF
github-actions.pdf
PDF
Selenium IDE LOCATORS
PPTX
Apache Maven
PPTX
Maven Basics - Explained
PDF
Git Branching for Agile Teams
PDF
도커 무작정 따라하기: 도커가 처음인 사람도 60분이면 웹 서버를 올릴 수 있습니다!
PPTX
Jenkins for java world
Git Lab Introduction
Alfresco DevCon 2019 Performance Tools of the Trade
Battle Of The Microservice Frameworks: Micronaut versus Quarkus edition!
Behavior-Driven Development and Automation Testing Using Cucumber Framework W...
React Class Components vs Functional Components: Which is Better?
Create an architecture for web test automation
Introduction to Maven
Git workflows presentation
Infrastructure & System Monitoring using Prometheus
Android jetpack compose | Declarative UI
Gitlab flow solo
Saving Time By Testing With Jest
0 to 60 With Outsystems
github-actions.pdf
Selenium IDE LOCATORS
Apache Maven
Maven Basics - Explained
Git Branching for Agile Teams
도커 무작정 따라하기: 도커가 처음인 사람도 60분이면 웹 서버를 올릴 수 있습니다!
Jenkins for java world
Ad

Viewers also liked (20)

PDF
Join the darkside: Selenium testing with Nightwatch.js
PDF
Front-End Testing: Demystified
PDF
Testing nightwatch, by David Torroija
PDF
Fullstack End-to-end test automation with Node.js, one year later
ZIP
Automated Frontend Testing
PDF
Node.js and Selenium Webdriver, a journey from the Java side
PDF
Nightwatch at Tilt
PDF
Night Watch with QA
PDF
20160905 - BrisJS - nightwatch testing
PDF
Javascript Test Automation Workshop (21.08.2014)
PPTX
PDF
Automated Web Testing using JavaScript
PDF
A Introduction to the World of Node, Javascript & Selenium
PPTX
Severity и Priority для неначинающих: очевидное и невероятное
DOCX
A Case Study of Using Selenium IDE and WebDriver_Word Doc
PPTX
Automated Testing using JavaScript
PPT
Selenium
DOCX
Anointing to excel
PPTX
Tooling for the productive front-end developer
PDF
Concurrency and Multithreading Demistified - Reversim Summit 2014
Join the darkside: Selenium testing with Nightwatch.js
Front-End Testing: Demystified
Testing nightwatch, by David Torroija
Fullstack End-to-end test automation with Node.js, one year later
Automated Frontend Testing
Node.js and Selenium Webdriver, a journey from the Java side
Nightwatch at Tilt
Night Watch with QA
20160905 - BrisJS - nightwatch testing
Javascript Test Automation Workshop (21.08.2014)
Automated Web Testing using JavaScript
A Introduction to the World of Node, Javascript & Selenium
Severity и Priority для неначинающих: очевидное и невероятное
A Case Study of Using Selenium IDE and WebDriver_Word Doc
Automated Testing using JavaScript
Selenium
Anointing to excel
Tooling for the productive front-end developer
Concurrency and Multithreading Demistified - Reversim Summit 2014
Ad

Similar to Browser Automated Testing Frameworks - Nightwatch.js (20)

PDF
Browser testing with nightwatch.js - Drupal Europe
PDF
DrupalCon Dublin 2016 - Automated browser testing with Nightwatch.js
PDF
Deep Dive Into NightWatch- Workshop by Pallavi Sharma.pdf
PDF
Nightwatch.js (vodQA Shots - Pune 2017)
PPTX
End to End Testing with nightwatchjs
PPTX
Web based automation testing on Node.js environment
PPTX
Automate testing with behat, selenium, phantom js and nightwatch.js (5)
PPTX
Browser testing with nightwatch.js
PDF
Intelligent Testing Tool: Selenium Web Driver
PDF
Microsoft power point automation-opensourcetestingtools_matrix-1
PDF
Microsoft power point automation-opensourcetestingtools_matrix-1
PPTX
Automation Testing by Ashwin Shiv
PPTX
[DevDay 2017] Automation Testing - Speaker: Nghia Khuong - Project Manager at...
PPTX
Automated Testing on Web Applications
PDF
KrishnaToolComparisionPPT.pdf
PPTX
Web Testing
PPTX
Automation
PDF
Top 5 automation testing tools to gear up website development
PPTX
Solving the Automation Puzzle - how to select the right automation framework ...
PDF
Build Fail-Proof Tests in Any Browser with Selenium
Browser testing with nightwatch.js - Drupal Europe
DrupalCon Dublin 2016 - Automated browser testing with Nightwatch.js
Deep Dive Into NightWatch- Workshop by Pallavi Sharma.pdf
Nightwatch.js (vodQA Shots - Pune 2017)
End to End Testing with nightwatchjs
Web based automation testing on Node.js environment
Automate testing with behat, selenium, phantom js and nightwatch.js (5)
Browser testing with nightwatch.js
Intelligent Testing Tool: Selenium Web Driver
Microsoft power point automation-opensourcetestingtools_matrix-1
Microsoft power point automation-opensourcetestingtools_matrix-1
Automation Testing by Ashwin Shiv
[DevDay 2017] Automation Testing - Speaker: Nghia Khuong - Project Manager at...
Automated Testing on Web Applications
KrishnaToolComparisionPPT.pdf
Web Testing
Automation
Top 5 automation testing tools to gear up website development
Solving the Automation Puzzle - how to select the right automation framework ...
Build Fail-Proof Tests in Any Browser with Selenium

More from Luís Bastião Silva (7)

PPTX
Cloud computing: highlights
PPTX
Indexadores Distribuidos utilizando Hadoop
PPTX
Creating your own datacenter
PPTX
PDF
Es apresentacao-final
PDF
Umit Project Presentation
PDF
Umit Presentation
Cloud computing: highlights
Indexadores Distribuidos utilizando Hadoop
Creating your own datacenter
Es apresentacao-final
Umit Project Presentation
Umit Presentation

Recently uploaded (20)

PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PPTX
ISO 45001 Occupational Health and Safety Management System
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PPTX
Odoo POS Development Services by CandidRoot Solutions
PPTX
ai tools demonstartion for schools and inter college
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
AI in Product Development-omnex systems
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
PTS Company Brochure 2025 (1).pdf.......
PPTX
Transform Your Business with a Software ERP System
PDF
Softaken Excel to vCard Converter Software.pdf
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
top salesforce developer skills in 2025.pdf
PDF
How Creative Agencies Leverage Project Management Software.pdf
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
System and Network Administration Chapter 2
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
ISO 45001 Occupational Health and Safety Management System
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Odoo POS Development Services by CandidRoot Solutions
ai tools demonstartion for schools and inter college
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
AI in Product Development-omnex systems
Which alternative to Crystal Reports is best for small or large businesses.pdf
PTS Company Brochure 2025 (1).pdf.......
Transform Your Business with a Software ERP System
Softaken Excel to vCard Converter Software.pdf
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
Wondershare Filmora 15 Crack With Activation Key [2025
top salesforce developer skills in 2025.pdf
How Creative Agencies Leverage Project Management Software.pdf
Internet Downloader Manager (IDM) Crack 6.42 Build 41
System and Network Administration Chapter 2

Browser Automated Testing Frameworks - Nightwatch.js

  • 1. Frameworks for Browser Automation Testing Luís A. Bastião Silva University of Aveiro DETI / IEETA bastiao@ua.pt
  • 2. Outline • Motivation • Comparison between frameworks • Nightwatch.js – How it works? – How to write tests? – How to run the tests? • How to use in your project? • Demo
  • 3. What is Browse Automating Tests? You can use it also to automate your daily tasks, if you are able to do it.. • Launch and automate your browser • Fill and submit forms • Click and follow links • Verify if the output is according of what you define.
  • 4. Motivation • Often web developers changes in the interface, change the code, we fix bugs and add new features. • Sometimes it conduct to wrong results • Browser Compatibility - break functionality • Test with heterogeneous datasets 4 .. or in other words, why should I use Browse Automated Testing? Software developers are humans and they made mistakes. Developers can type: “id="buttob_searc” where should be “id=“button_search” – and it breaks the functionality. Browse automated tests can detect it!
  • 5. Comparison between different frameworks Name Nightwatch.js Selenium Browsera dalekjs htmlunit watin sahipro venusjs OSS Yes Yes Paid Yes Yes Yes Paid Yes Activity High High Support Medium Low Low Support Medium WebDriver Yes Yes Yes Yes No No, IE only Yes Yes Jenkins* Medium Medium Automated tests, reports Medium Unknown Unknown Automated tests, reports Medium Feel free to contribute to this comparison: http://goo.gl/Vq3WeO Output Very good, JUnit Very good, JUnit Very good, UI Navigation Good Good Unknown Very good, UI Navigation Unknown Difficulty to write Easy Medium (syntax is not good) Easy Easy Verbose Easy Easy--- Easy Deployment Medium Medium Easy Medium Medium Easy Easy Medium Observations Selenium - - Docs not good - - - Developed by LinkedIn
  • 6. Why nightwatch.js? • Easy to write tests • Github activity • Free • Good documentation • Supports IE ( we know that no one cares, but in the end everybody cares. ) • It is working now.  • More info: – ~10k downloads/month – ~150 forks (github) – ~2300 stars (github)
  • 7. Nightwatch.js architecture What are behind it? From: http://nightwatchjs.org/guide#theory-of-operation and http://www.slideshare.net/sethmcl/join-the-darkside-nightwatchjs
  • 8. Directory structure How to start? What files should I have? How the test groups works? • Install: – $ npm install nightwatch – Run Selenium server • nightwatch.js – #!/usr/bin/env node – require('nightwatch/bin/runner.js'); • nightwatch.json • Tests/ – Login.js – Accounts/0001_landing_page.js – Accounts/0002_register.js – dashboard/0001_widgets.js – Your own structure, you define it!
  • 10. Test sample workflow 1. Open Browser URL 2. Locate the username field and fill it with “admin” 3. Find the password field and fill it with “doNotGiveATry” 4. Find the Login button and submit 5. Verify the output to check if it successes. You need to know Javascript and how to use CSS or Xpath Selectors. You can learn about it here: http://www.w3.org/TR/CSS21/selector.html or http://www.w3schools.com/css/css_attribute_selectors.asp
  • 11. Assertation or Verification • assert.title(‘automated tests rocks’) – If false, log failure and stop to run the test suite. • verification.title(‘automated tests rocks’) – If false, log failure and continue running the test suite.
  • 12. What kind of assertations exists? • .assert.title(‘Catalogue’) • .assert.urlContains('done') • .assert.elementPresent('#results_size', ’0 results') • css properties, … and more available!
  • 13. How to run? • $ node nightwatch.js –-env=chrome • Windows you can test with ie: – $ node nightwatch.js –-env=chrome,ie, firefox • You can skip test groups: – $ node nightwatch –-env=chrome –-skip-group= accounts,dashboard • You can run the only ones that has a specific tag: – $ node nightwatch –-env=chrome –-tag=login
  • 14. What the output it retrieves? Console output
  • 15. What the output it retrieves? Junit format
  • 16. Can I use it in my own project? Write tests? Nooooooooooooooo! • Is your project web? If yes: – Yes, you should. – We have a Windows machine up and running You can integrate Jenkins of the Bio group. – In some cases you may need to change the webapp to become the life easier. – You will avoid headaches in the future  If you do NOT use Browse Automating Testing: Development stage Productio n User Feedback
  • 17. Can I use it in my own project? Write tests? Easy life! But yes, you still spend time, but you win upfront. • Is your project web? If yes: – Yes, you should. – We have a Windows machine up and running You can integrate Jenkins of the Bio group. – In some cases you may need to change the webapp to become the life easier. – You will avoid headaches in the future  If you do USE Browse Automating Testing: Development Productio Usenr Feedback Write Tests
  • 18. Credits & References • Ricardo Ribeiro – He did the first steps in the nightwatch.js – Deployed the full solution in Windows environment – Write tests for EMIF Catalogue • http://nightwatchjs.org/ • http://www.slideshare.net/sethmcl/join-the- darkside-nightwatchjs • It will be available in my slideshare: – http://www.slideshare.net/bastiao
  • 19. See it running… • EMIF Catalogue, let’s check the tests
  • 20. Thanks for your attention! Luís A. Bastião Silva University of Aveiro DETI / IEETA bastiao@ua.pt