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

What's hot

Cypress for Testing
Cypress for TestingCypress for Testing
Cypress for Testing
PoojaSingh1123
 
Testing on Mobile Devices with Location Services
Testing on Mobile Devices with Location ServicesTesting on Mobile Devices with Location Services
Testing on Mobile Devices with Location Services
Sauce Labs
 
How to Get Started with Cypress
How to Get Started with CypressHow to Get Started with Cypress
How to Get Started with Cypress
Applitools
 
Cross browser testing using BrowserStack
Cross browser testing using BrowserStack Cross browser testing using BrowserStack
Cross browser testing using BrowserStack
RapidValue
 
Introduction to Integration Testing With Cypress
Introduction to Integration Testing With CypressIntroduction to Integration Testing With Cypress
Introduction to Integration Testing With Cypress
Erez Cohen
 
automation testing benefits
automation testing benefitsautomation testing benefits
automation testing benefitsnazeer pasha
 
Automated testing with Cypress
Automated testing with CypressAutomated testing with Cypress
Automated testing with Cypress
Yong Shean Chong
 
Why you should switch to Cypress for modern web testing?
Why you should switch to Cypress for modern web testing?Why you should switch to Cypress for modern web testing?
Why you should switch to Cypress for modern web testing?
Shivam Bharadwaj
 
Azure Pipelines
Azure PipelinesAzure Pipelines
Azure Pipelines
Mithun Shanbhag
 
Cypress Automation
Cypress  AutomationCypress  Automation
Cypress Automation
Susantha Pathirana
 
Appium
AppiumAppium
Cross Browser Testing Using LambdaTest | Edureka
Cross Browser Testing Using LambdaTest | EdurekaCross Browser Testing Using LambdaTest | Edureka
Cross Browser Testing Using LambdaTest | Edureka
Edureka!
 
Test Automation Best Practices (with SOA test approach)
Test Automation Best Practices (with SOA test approach)Test Automation Best Practices (with SOA test approach)
Test Automation Best Practices (with SOA test approach)
Leonard Fingerman
 
Introduction to Selenium Web Driver
Introduction to Selenium Web DriverIntroduction to Selenium Web Driver
Introduction to Selenium Web Driver
Return on Intelligence
 
Cypress
CypressCypress
Appium: Automation for Mobile Apps
Appium: Automation for Mobile AppsAppium: Automation for Mobile Apps
Appium: Automation for Mobile Apps
Sauce Labs
 
Cypress vs Selenium WebDriver: Better, Or Just Different? -- by Gil Tayar
Cypress vs Selenium WebDriver: Better, Or Just Different? -- by Gil TayarCypress vs Selenium WebDriver: Better, Or Just Different? -- by Gil Tayar
Cypress vs Selenium WebDriver: Better, Or Just Different? -- by Gil Tayar
Applitools
 
Cypress Testing.pptx
Cypress Testing.pptxCypress Testing.pptx
Cypress Testing.pptx
JasmeenShrestha
 
Automation Testing & TDD
Automation Testing & TDDAutomation Testing & TDD
Automation Testing & TDD
Nhật Nguyễn Khắc
 
Automation With Appium
Automation With AppiumAutomation With Appium
Automation With Appium
Knoldus Inc.
 

What's hot (20)

Cypress for Testing
Cypress for TestingCypress for Testing
Cypress for Testing
 
Testing on Mobile Devices with Location Services
Testing on Mobile Devices with Location ServicesTesting on Mobile Devices with Location Services
Testing on Mobile Devices with Location Services
 
How to Get Started with Cypress
How to Get Started with CypressHow to Get Started with Cypress
How to Get Started with Cypress
 
Cross browser testing using BrowserStack
Cross browser testing using BrowserStack Cross browser testing using BrowserStack
Cross browser testing using BrowserStack
 
Introduction to Integration Testing With Cypress
Introduction to Integration Testing With CypressIntroduction to Integration Testing With Cypress
Introduction to Integration Testing With Cypress
 
automation testing benefits
automation testing benefitsautomation testing benefits
automation testing benefits
 
Automated testing with Cypress
Automated testing with CypressAutomated testing with Cypress
Automated testing with Cypress
 
Why you should switch to Cypress for modern web testing?
Why you should switch to Cypress for modern web testing?Why you should switch to Cypress for modern web testing?
Why you should switch to Cypress for modern web testing?
 
Azure Pipelines
Azure PipelinesAzure Pipelines
Azure Pipelines
 
Cypress Automation
Cypress  AutomationCypress  Automation
Cypress Automation
 
Appium
AppiumAppium
Appium
 
Cross Browser Testing Using LambdaTest | Edureka
Cross Browser Testing Using LambdaTest | EdurekaCross Browser Testing Using LambdaTest | Edureka
Cross Browser Testing Using LambdaTest | Edureka
 
Test Automation Best Practices (with SOA test approach)
Test Automation Best Practices (with SOA test approach)Test Automation Best Practices (with SOA test approach)
Test Automation Best Practices (with SOA test approach)
 
Introduction to Selenium Web Driver
Introduction to Selenium Web DriverIntroduction to Selenium Web Driver
Introduction to Selenium Web Driver
 
Cypress
CypressCypress
Cypress
 
Appium: Automation for Mobile Apps
Appium: Automation for Mobile AppsAppium: Automation for Mobile Apps
Appium: Automation for Mobile Apps
 
Cypress vs Selenium WebDriver: Better, Or Just Different? -- by Gil Tayar
Cypress vs Selenium WebDriver: Better, Or Just Different? -- by Gil TayarCypress vs Selenium WebDriver: Better, Or Just Different? -- by Gil Tayar
Cypress vs Selenium WebDriver: Better, Or Just Different? -- by Gil Tayar
 
Cypress Testing.pptx
Cypress Testing.pptxCypress Testing.pptx
Cypress Testing.pptx
 
Automation Testing & TDD
Automation Testing & TDDAutomation Testing & TDD
Automation Testing & TDD
 
Automation With Appium
Automation With AppiumAutomation With Appium
Automation With Appium
 

Viewers also liked

Join the darkside: Selenium testing with Nightwatch.js
Join the darkside: Selenium testing with Nightwatch.jsJoin the darkside: Selenium testing with Nightwatch.js
Join the darkside: Selenium testing with Nightwatch.js
Seth McLaughlin
 
Front-End Testing: Demystified
Front-End Testing: DemystifiedFront-End Testing: Demystified
Front-End Testing: Demystified
Seth McLaughlin
 
Testing nightwatch, by David Torroija
Testing nightwatch, by David TorroijaTesting nightwatch, by David Torroija
Testing nightwatch, by David Torroija
David Torroija
 
Fullstack End-to-end test automation with Node.js, one year later
Fullstack End-to-end test automation with Node.js, one year laterFullstack End-to-end test automation with Node.js, one year later
Fullstack End-to-end test automation with Node.js, one year later
Mek Srunyu Stittri
 
Automated Frontend Testing
Automated Frontend TestingAutomated Frontend Testing
Automated Frontend Testing
Neil Crosby
 
Node.js and Selenium Webdriver, a journey from the Java side
Node.js and Selenium Webdriver, a journey from the Java sideNode.js and Selenium Webdriver, a journey from the Java side
Node.js and Selenium Webdriver, a journey from the Java side
Mek Srunyu Stittri
 
Nightwatch at Tilt
Nightwatch at TiltNightwatch at Tilt
Nightwatch at Tilt
Dave King
 
Night Watch with QA
Night Watch with QANight Watch with QA
Night Watch with QA
Carsten Sandtner
 
20160905 - BrisJS - nightwatch testing
20160905 - BrisJS - nightwatch testing20160905 - BrisJS - nightwatch testing
20160905 - BrisJS - nightwatch testing
Vladimir Roudakov
 
Javascript Test Automation Workshop (21.08.2014)
Javascript Test Automation Workshop (21.08.2014)Javascript Test Automation Workshop (21.08.2014)
Javascript Test Automation Workshop (21.08.2014)
Deutsche Post
 
Automated Web Testing using JavaScript
Automated Web Testing using JavaScriptAutomated Web Testing using JavaScript
Automated Web Testing using JavaScript
Simon Guest
 
A Introduction to the World of Node, Javascript & Selenium
A Introduction to the World of Node, Javascript & SeleniumA Introduction to the World of Node, Javascript & Selenium
A Introduction to the World of Node, Javascript & Selenium
James Eisenhauer
 
Severity и Priority для неначинающих: очевидное и невероятное
Severity и Priority для неначинающих: очевидное и невероятноеSeverity и Priority для неначинающих: очевидное и невероятное
Severity и Priority для неначинающих: очевидное и невероятное
Deutsche Post
 
Automated Testing using JavaScript
Automated Testing using JavaScriptAutomated Testing using JavaScript
Automated Testing using JavaScript
Simon Guest
 
Selenium
SeleniumSelenium
Selenium
Kalyan ch
 
Tooling for the productive front-end developer
Tooling for the productive front-end developerTooling for the productive front-end developer
Tooling for the productive front-end developer
Maurice De Beijer [MVP]
 
Concurrency and Multithreading Demistified - Reversim Summit 2014
Concurrency and Multithreading Demistified - Reversim Summit 2014Concurrency and Multithreading Demistified - Reversim Summit 2014
Concurrency and Multithreading Demistified - Reversim Summit 2014
Haim Yadid
 

Viewers also liked (20)

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

Similar to Browser Automated Testing Frameworks - Nightwatch.js

Testing Ext JS and Sencha Touch
Testing Ext JS and Sencha TouchTesting Ext JS and Sencha Touch
Testing Ext JS and Sencha Touch
Mats Bryntse
 
Node.js Development Workflow Automation with Grunt.js
Node.js Development Workflow Automation with Grunt.jsNode.js Development Workflow Automation with Grunt.js
Node.js Development Workflow Automation with Grunt.js
kiyanwang
 
Automated Acceptance Testing from Scratch
Automated Acceptance Testing from ScratchAutomated Acceptance Testing from Scratch
Automated Acceptance Testing from Scratch
Excella
 
TDD super mondays-june-2014
TDD super mondays-june-2014TDD super mondays-june-2014
TDD super mondays-june-2014
Alex Kavanagh
 
Testing ASP.NET - Progressive.NET
Testing ASP.NET - Progressive.NETTesting ASP.NET - Progressive.NET
Testing ASP.NET - Progressive.NET
Ben Hall
 
Creating testing tools to support development
Creating testing tools to support developmentCreating testing tools to support development
Creating testing tools to support development
Chema del Barco
 
Java script unit testing
Java script unit testingJava script unit testing
Java script unit testing
Mats Bryntse
 
Getting Started with Selenium
Getting Started with SeleniumGetting Started with Selenium
Getting Started with Selenium
Dave Haeffner
 
A Sampling of Tools
A Sampling of ToolsA Sampling of Tools
A Sampling of Tools
Dawn Code
 
How to use selenium successfully
How to use selenium successfullyHow to use selenium successfully
How to use selenium successfully
TEST Huddle
 
Mastering Test Automation: How to Use Selenium Successfully
Mastering Test Automation: How to Use Selenium Successfully Mastering Test Automation: How to Use Selenium Successfully
Mastering Test Automation: How to Use Selenium Successfully
Applitools
 
Implementing Quality on a Java Project
Implementing Quality on a Java ProjectImplementing Quality on a Java Project
Implementing Quality on a Java Project
Vincent Massol
 
Testing mit Codeception: Full-stack testing PHP framework
Testing mit Codeception: Full-stack testing PHP frameworkTesting mit Codeception: Full-stack testing PHP framework
Testing mit Codeception: Full-stack testing PHP framework
SusannSgorzaly
 
Petri for kyiv.pptx
Petri for kyiv.pptxPetri for kyiv.pptx
Petri for kyiv.pptx
Talya Gendler
 
Escaping Test Hell - ACCU 2014
Escaping Test Hell - ACCU 2014Escaping Test Hell - ACCU 2014
Escaping Test Hell - ACCU 2014
Wojciech Seliga
 
STARWEST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...
STARWEST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...STARWEST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...
STARWEST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...Anna Russo
 
Unit Testing - Calgary .NET User Group - Nov 26 2014 - Depth Consulting
Unit Testing -  Calgary .NET User Group - Nov 26 2014 - Depth ConsultingUnit Testing -  Calgary .NET User Group - Nov 26 2014 - Depth Consulting
Unit Testing - Calgary .NET User Group - Nov 26 2014 - Depth Consulting
Dave White
 
Test automation proposal
Test automation proposalTest automation proposal
Test automation proposal
Mihai-Cristian Fratila
 
Challenges in test automation for web apps
Challenges in test automation for web appsChallenges in test automation for web apps
Challenges in test automation for web apps
Sudara Fernando
 

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

Testing Ext JS and Sencha Touch
Testing Ext JS and Sencha TouchTesting Ext JS and Sencha Touch
Testing Ext JS and Sencha Touch
 
Node.js Development Workflow Automation with Grunt.js
Node.js Development Workflow Automation with Grunt.jsNode.js Development Workflow Automation with Grunt.js
Node.js Development Workflow Automation with Grunt.js
 
Automated Acceptance Testing from Scratch
Automated Acceptance Testing from ScratchAutomated Acceptance Testing from Scratch
Automated Acceptance Testing from Scratch
 
TDD super mondays-june-2014
TDD super mondays-june-2014TDD super mondays-june-2014
TDD super mondays-june-2014
 
Testing ASP.NET - Progressive.NET
Testing ASP.NET - Progressive.NETTesting ASP.NET - Progressive.NET
Testing ASP.NET - Progressive.NET
 
Creating testing tools to support development
Creating testing tools to support developmentCreating testing tools to support development
Creating testing tools to support development
 
Java script unit testing
Java script unit testingJava script unit testing
Java script unit testing
 
Getting Started with Selenium
Getting Started with SeleniumGetting Started with Selenium
Getting Started with Selenium
 
A Sampling of Tools
A Sampling of ToolsA Sampling of Tools
A Sampling of Tools
 
How to use selenium successfully
How to use selenium successfullyHow to use selenium successfully
How to use selenium successfully
 
Mastering Test Automation: How to Use Selenium Successfully
Mastering Test Automation: How to Use Selenium Successfully Mastering Test Automation: How to Use Selenium Successfully
Mastering Test Automation: How to Use Selenium Successfully
 
Implementing Quality on a Java Project
Implementing Quality on a Java ProjectImplementing Quality on a Java Project
Implementing Quality on a Java Project
 
Testing mit Codeception: Full-stack testing PHP framework
Testing mit Codeception: Full-stack testing PHP frameworkTesting mit Codeception: Full-stack testing PHP framework
Testing mit Codeception: Full-stack testing PHP framework
 
Petri for kyiv.pptx
Petri for kyiv.pptxPetri for kyiv.pptx
Petri for kyiv.pptx
 
Escaping Test Hell - ACCU 2014
Escaping Test Hell - ACCU 2014Escaping Test Hell - ACCU 2014
Escaping Test Hell - ACCU 2014
 
STARWEST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...
STARWEST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...STARWEST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...
STARWEST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...
 
Unit Testing - Calgary .NET User Group - Nov 26 2014 - Depth Consulting
Unit Testing -  Calgary .NET User Group - Nov 26 2014 - Depth ConsultingUnit Testing -  Calgary .NET User Group - Nov 26 2014 - Depth Consulting
Unit Testing - Calgary .NET User Group - Nov 26 2014 - Depth Consulting
 
Test automation proposal
Test automation proposalTest automation proposal
Test automation proposal
 
Django Girls Tutorial
Django Girls TutorialDjango Girls Tutorial
Django Girls Tutorial
 
Challenges in test automation for web apps
Challenges in test automation for web appsChallenges in test automation for web apps
Challenges in test automation for web apps
 

More from Luís Bastião Silva

Indexadores Distribuidos utilizando Hadoop
Indexadores Distribuidos utilizando HadoopIndexadores Distribuidos utilizando Hadoop
Indexadores Distribuidos utilizando HadoopLuís Bastião Silva
 
Umit Presentation
Umit PresentationUmit Presentation
Umit Presentation
Luís Bastião Silva
 

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

Cloud computing: highlights
Cloud computing: highlightsCloud computing: highlights
Cloud computing: highlights
 
Indexadores Distribuidos utilizando Hadoop
Indexadores Distribuidos utilizando HadoopIndexadores Distribuidos utilizando Hadoop
Indexadores Distribuidos utilizando Hadoop
 
Creating your own datacenter
Creating your own datacenterCreating your own datacenter
Creating your own datacenter
 
Es finalv2
Es finalv2Es finalv2
Es finalv2
 
Es apresentacao-final
Es apresentacao-finalEs apresentacao-final
Es apresentacao-final
 
Umit Project Presentation
Umit Project PresentationUmit Project Presentation
Umit Project Presentation
 
Umit Presentation
Umit PresentationUmit Presentation
Umit Presentation
 

Recently uploaded

Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
Matt Welsh
 
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
XfilesPro
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
Globus
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Shahin Sheidaei
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
takuyayamamoto1800
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
Globus
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
abdulrafaychaudhry
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
AMB-Review
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
Ortus Solutions, Corp
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
XfilesPro
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
vrstrong314
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns
 
Strategies for Successful Data Migration Tools.pptx
Strategies for Successful Data Migration Tools.pptxStrategies for Successful Data Migration Tools.pptx
Strategies for Successful Data Migration Tools.pptx
varshanayak241
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
Globus
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
Juraj Vysvader
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
wottaspaceseo
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 

Recently uploaded (20)

Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
 
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
 
Strategies for Successful Data Migration Tools.pptx
Strategies for Successful Data Migration Tools.pptxStrategies for Successful Data Migration Tools.pptx
Strategies for Successful Data Migration Tools.pptx
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 

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