SlideShare ist ein Scribd-Unternehmen logo
1 von 42
©2017 Faichi Solutions Pvt. Ltd.
Automate Testing with Behat,
Selenium, PhantomJs and
Nightwatch.js
©2017 Faichi Solutions Pvt. Ltd. 2
Nikhil Sukul
Senior Drupal Architect
Faichi Solutions LLC
nikhilsukul
nikhilsukul
Nikhil is an open source enthusiast and
contributor to Drupal and its community. He
has an overall software experience of 17+
years and has been active in Drupal space
since last 9 years.
Speakers, who?
Gaurav Bajpai
Senior Drupal Developer
Faichi Solutions LLC
gaurav02b
gaurav-bajpai
Gaurav is an active member and contributor to
Drupal community. His overall Drupal experience is
5+ years. He is Acquia certified developer.
©2017 Faichi Solutions Pvt. Ltd. 3
©2017 Faichi Solutions Pvt. Ltd. 4
©2017 Faichi Solutions Pvt. Ltd. 5
©2017 Faichi Solutions Pvt. Ltd. 6
©2017 Faichi Solutions Pvt. Ltd. 7
©2017 Faichi Solutions Pvt. Ltd.
What is Testing
©2017 Faichi Solutions Pvt. Ltd. 9
• In general, testing is finding out how well something
works,
• Software testing is the process of evaluation a software
item to detect differences between given input and
expected output.
©2017 Faichi Solutions Pvt. Ltd.
How to do Testing
©2017 Faichi Solutions Pvt. Ltd. 11
©2017 Faichi Solutions Pvt. Ltd.
Why Testing
©2017 Faichi Solutions Pvt. Ltd. 13
• To point out the defects and errors made during the
development phases.
• Makes Customer’s reliability and their satisfaction in the
application.
• Effective performance of the software.
• Application resulting to failure is very expensive in future
or in later stages of the development.
©2017 Faichi Solutions Pvt. Ltd. 14
©2017 Faichi Solutions Pvt. Ltd.
Who will Test?
©2017 Faichi Solutions Pvt. Ltd.
©2017 Faichi Solutions Pvt. Ltd.
©2017 Faichi Solutions Pvt. Ltd.
They will Test
©2017 Faichi Solutions Pvt. Ltd.
Types of Testing
(By Execution)
©2017 Faichi Solutions Pvt. Ltd. 20
Manual Testing Automation TestingManual Testing Automation Testing
©2017 Faichi Solutions Pvt. Ltd. 21
Automation Testing Manual Testing
It is very much helpful in
regressions testing.
To execute the test cases first
time.
Runs test cases significantly
faster than human resources.
Running tests manually can be
very time consuming.
Good for automating the Build
Verification Testing (BVT) .
To execute the Build Verification
Testing (BVT) is very mundane
and tiresome.
Initial cost is high. Manual testing requires less cost
than automation.
©2017 Faichi Solutions Pvt. Ltd. 22
Automated Testing
©2017 Faichi Solutions Pvt. Ltd. 23
Real browser testing
Real Browsers are running and performing functions or
commands in front of users in UI. Examples of Real
browsers are Google Chrome, Firefox, and Internet
Explorer etc.
©2017 Faichi Solutions Pvt. Ltd. 24
Headless browser testing
• Headless browsers are basically
web browsers that without a
graphical user interface.
• Examples of Headless browsers
are PhantomJS and ZombieJS etc.
©2017 Faichi Solutions Pvt. Ltd. 25
Real vs Headless browser testing
• Headless Browsers faster than real browsers:
– Real browsers take time opening, rendering html, CSS, Javascript
and images while headless browsers don’t require it. Headless
browsers will start performing functions without waiting for page
to load completely.
• Headless browsers are not representing real users:
– user bugs like images are crashing or not as UI is not showing up
is very difficult to detect in headless browsers.
• Error detection in real browsers is easy pesy:
– In Real browser as functions are performing in front of user and
he can interact with it so he can easily detect where the tests
goes fail. And can easily debug if anything goes wrong.
• Headless browsers does not support Ajax.
©2017 Faichi Solutions Pvt. Ltd. 26
©2017 Faichi Solutions Pvt. Ltd. 27
Selenium WebDriver is a collection of open source APIs which
are used to automate the testing of a web application and it is
platform-independent.
©2017 Faichi Solutions Pvt. Ltd. 28
How Selenium WebDriver works?
You can Download Selenium Jar from http://selenium-
release.storage.googleapis.com/index.html
Chrome
Driver
IE Driver
©2017 Faichi Solutions Pvt. Ltd. 29
• Behat is an open source Behavior-Driven Development
framework for PHP.
• Behat is a tool to test the behavior of any application,
described in special language called Gherkin.
• Gherkin is a Business Readable, Domain Specific Language
created especially for behavior descriptions. It gives you
the ability to remove logic details from behavior tests.
©2017 Faichi Solutions Pvt. Ltd. 30
Feature: Some terse yet descriptive text of what is desired
In order to realize a named business value
As an explicit system actor
I want to gain some beneficial outcome which furthers the goal
Scenario: Some determinable business situation
Given some precondition
And some other precondition
When some action by the actor
And some other action
And yet another action
Then some testable outcome is achieved
And something else we can check happens too
Scenario: A different situation
...
©2017 Faichi Solutions Pvt. Ltd. 31
• Mink is the browser simulator for Behat.
• It is a browser emulator abstraction layer. It hides
emulator differences behind a single, consistent API.
• Mink Support for both in-browser and headless browser
emulators. It is a PHP 5.3+ library.
You can Download and Install Behat and Mink:
http://docs.behat.org/en/v2.5/cookbook/behat_and_mink.html
©2017 Faichi Solutions Pvt. Ltd. 32
“PhantomJS is a scripted, headless browser used for
automating web page interaction. PhantomJS
provides a JavaScript API enabling automated
navigation, screenshots, user behavior and assertions
making it a common tool used to run browser-based
unit tests in a headless system like a continuous
integration environment.” - wikipedia
You can Download and Install PhantomJS:
http://phantomjs.org/download.html
©2017 Faichi Solutions Pvt. Ltd. 33
• Headless website testing:
– Run functional tests along with the frameworks like QUnit, Jasmine,
Mocha, Capybara, WebDriver etc.
• Screen capture:
– taking screen capture programmatically.
• The development can be very easier:
– While developing the UI, you can write the code by selecting the HTML
element wherever you wanted.
• Test framework:
– PhantomJS itself is not a test framework, it is only used to launch the
tests via a suitable test runner.
PhantomJS is a good:
©2017 Faichi Solutions Pvt. Ltd. 34
CasperJS is a navigation scripting & testing utility for PhantomJS
headless browser, written in Javascript.
CasperJs
©2017 Faichi Solutions Pvt. Ltd. 35
• A Browser Automation tool.
• It is an easy to use Node.js based End-to-End (E2E) testing
solution for browser based apps and websites.
• It uses the powerful W3C WebDriver API to perform
commands and assertions on DOM elements.
You can Download and Install NightWatch.js:
http://nightwatchjs.org/getingstarted#installation
©2017 Faichi Solutions Pvt. Ltd. 36
Nightwatch.js architecture
©2017 Faichi Solutions Pvt. Ltd.
What to use
and when?
©2017 Faichi Solutions Pvt. Ltd. 38
©2017 Faichi Solutions Pvt. Ltd. 39
References:
http://www.softwaretestingclass.com/automation-testing-vs-manual-testing/
http://www.teluguone.com/teluguoneUserFiles/Nothing can stop
Automation(1).png
http://www.seleniumhq.org/projects/ide/selenium-ide.gif
http://nightwatchjs.org/guide#theory-of-operation
http://www.slideshare.net/sethmcl/join-the-darkside-nightwatchjs
https://www.youtube.com/watch?v=-eJ2cZXyJ0E
http://www.algoworks.com/blog/choosing-your-automated-testing-frameworks-
phantomjscasperjs-vs-selenium/
http://craveco.de/posts/2016/03/16/part-2-automated-drupal-testing-behat-
selenium-and-headless-firefox
http://www.pngall.com/wp-content/uploads/2016/06/Browsers-
Transparent.png
http://economictimes.indiatimes.com/definition/selenium-web-driver
http://mink.behat.org/en/latest
http://phantomjs.org
https://upload.wikimedia.org/wikipedia/commons/thumb/b/b3/Terminalicon2.p
ng/480px-Terminalicon2.png
http://shashikantjagtap.net/running-behat-scenarios-with-pahntomjs
41
CONNECT WITH US, ASK FOR A DEMO !
Faichi Solutions, LLC
640 W. California Ave Suite 210 Sunnyvale, CA 94086
Phone: +1 (408) 769-4941
Email: inform@faichi.com
FAICHI SOLUTIONS PVT LTD
USA:
OFFICE NO. 230, 640 WEST
CALIFORNIA AVENUE SUITE 210
SUNNYVALE, CA 94086
TEL: +1 (408) 769-4941
INDIA:
ACCORD IT PARK, BANER ROAD,
PUNE, MAHARASHATRA-411045
PH. NO. +91-20-65291435
THANK YOU

Weitere ähnliche Inhalte

Was ist angesagt?

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.jsSeth McLaughlin
 
Automated Frontend Testing
Automated Frontend TestingAutomated Frontend Testing
Automated Frontend TestingNeil Crosby
 
UI Testing Automation
UI Testing AutomationUI Testing Automation
UI Testing AutomationAgileEngine
 
Automated Testing using JavaScript
Automated Testing using JavaScriptAutomated Testing using JavaScript
Automated Testing using JavaScriptSimon Guest
 
Automation Abstraction Layers: Page Objects and Beyond
Automation Abstraction Layers: Page Objects and BeyondAutomation Abstraction Layers: Page Objects and Beyond
Automation Abstraction Layers: Page Objects and BeyondAlan Richardson
 
Protractor Tutorial Quality in Agile 2015
Protractor Tutorial Quality in Agile 2015Protractor Tutorial Quality in Agile 2015
Protractor Tutorial Quality in Agile 2015Andrew Eisenberg
 
ForwardJS 2017 - Fullstack end-to-end Test Automation with node.js
ForwardJS 2017 -  Fullstack end-to-end Test Automation with node.jsForwardJS 2017 -  Fullstack end-to-end Test Automation with node.js
ForwardJS 2017 - Fullstack end-to-end Test Automation with node.jsMek Srunyu Stittri
 
Carmen Popoviciu - Protractor styleguide | Codemotion Milan 2015
Carmen Popoviciu - Protractor styleguide | Codemotion Milan 2015Carmen Popoviciu - Protractor styleguide | Codemotion Milan 2015
Carmen Popoviciu - Protractor styleguide | Codemotion Milan 2015Codemotion
 
Nightwatch at Tilt
Nightwatch at TiltNightwatch at Tilt
Nightwatch at TiltDave King
 
High Performance JavaScript 2011
High Performance JavaScript 2011High Performance JavaScript 2011
High Performance JavaScript 2011Nicholas Zakas
 
Automated Smoke Tests with Protractor
Automated Smoke Tests with ProtractorAutomated Smoke Tests with Protractor
Automated Smoke Tests with Protractor🌱 Dale Spoonemore
 
20160905 - BrisJS - nightwatch testing
20160905 - BrisJS - nightwatch testing20160905 - BrisJS - nightwatch testing
20160905 - BrisJS - nightwatch testingVladimir Roudakov
 
Hands on Exploration of Page Objects and Abstraction Layers with Selenium Web...
Hands on Exploration of Page Objects and Abstraction Layers with Selenium Web...Hands on Exploration of Page Objects and Abstraction Layers with Selenium Web...
Hands on Exploration of Page Objects and Abstraction Layers with Selenium Web...Alan Richardson
 
UI Testing Automation - Alex Kalinovsky - CreamTec LLC
UI Testing Automation - Alex Kalinovsky - CreamTec LLCUI Testing Automation - Alex Kalinovsky - CreamTec LLC
UI Testing Automation - Alex Kalinovsky - CreamTec LLCJim Lane
 
Test-driven Development with Drupal and Codeception (DrupalCamp Brighton)
Test-driven Development with Drupal and Codeception (DrupalCamp Brighton)Test-driven Development with Drupal and Codeception (DrupalCamp Brighton)
Test-driven Development with Drupal and Codeception (DrupalCamp Brighton)Cogapp
 
Codeception introduction and use in Yii
Codeception introduction and use in YiiCodeception introduction and use in Yii
Codeception introduction and use in YiiIlPeach
 
Acceptance & Functional Testing with Codeception - Devspace 2015
Acceptance & Functional Testing with Codeception - Devspace 2015 Acceptance & Functional Testing with Codeception - Devspace 2015
Acceptance & Functional Testing with Codeception - Devspace 2015 Joe Ferguson
 
Better Page Object Handling with Loadable Component Pattern
Better Page Object Handling with Loadable Component PatternBetter Page Object Handling with Loadable Component Pattern
Better Page Object Handling with Loadable Component PatternSargis Sargsyan
 

Was ist angesagt? (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
 
Automated Frontend Testing
Automated Frontend TestingAutomated Frontend Testing
Automated Frontend Testing
 
Night Watch with QA
Night Watch with QANight Watch with QA
Night Watch with QA
 
UI Testing Automation
UI Testing AutomationUI Testing Automation
UI Testing Automation
 
Automated Testing using JavaScript
Automated Testing using JavaScriptAutomated Testing using JavaScript
Automated Testing using JavaScript
 
Automation Abstraction Layers: Page Objects and Beyond
Automation Abstraction Layers: Page Objects and BeyondAutomation Abstraction Layers: Page Objects and Beyond
Automation Abstraction Layers: Page Objects and Beyond
 
Protractor Tutorial Quality in Agile 2015
Protractor Tutorial Quality in Agile 2015Protractor Tutorial Quality in Agile 2015
Protractor Tutorial Quality in Agile 2015
 
ForwardJS 2017 - Fullstack end-to-end Test Automation with node.js
ForwardJS 2017 -  Fullstack end-to-end Test Automation with node.jsForwardJS 2017 -  Fullstack end-to-end Test Automation with node.js
ForwardJS 2017 - Fullstack end-to-end Test Automation with node.js
 
Carmen Popoviciu - Protractor styleguide | Codemotion Milan 2015
Carmen Popoviciu - Protractor styleguide | Codemotion Milan 2015Carmen Popoviciu - Protractor styleguide | Codemotion Milan 2015
Carmen Popoviciu - Protractor styleguide | Codemotion Milan 2015
 
Webdriver.io
Webdriver.io Webdriver.io
Webdriver.io
 
Nightwatch at Tilt
Nightwatch at TiltNightwatch at Tilt
Nightwatch at Tilt
 
High Performance JavaScript 2011
High Performance JavaScript 2011High Performance JavaScript 2011
High Performance JavaScript 2011
 
Automated Smoke Tests with Protractor
Automated Smoke Tests with ProtractorAutomated Smoke Tests with Protractor
Automated Smoke Tests with Protractor
 
20160905 - BrisJS - nightwatch testing
20160905 - BrisJS - nightwatch testing20160905 - BrisJS - nightwatch testing
20160905 - BrisJS - nightwatch testing
 
Hands on Exploration of Page Objects and Abstraction Layers with Selenium Web...
Hands on Exploration of Page Objects and Abstraction Layers with Selenium Web...Hands on Exploration of Page Objects and Abstraction Layers with Selenium Web...
Hands on Exploration of Page Objects and Abstraction Layers with Selenium Web...
 
UI Testing Automation - Alex Kalinovsky - CreamTec LLC
UI Testing Automation - Alex Kalinovsky - CreamTec LLCUI Testing Automation - Alex Kalinovsky - CreamTec LLC
UI Testing Automation - Alex Kalinovsky - CreamTec LLC
 
Test-driven Development with Drupal and Codeception (DrupalCamp Brighton)
Test-driven Development with Drupal and Codeception (DrupalCamp Brighton)Test-driven Development with Drupal and Codeception (DrupalCamp Brighton)
Test-driven Development with Drupal and Codeception (DrupalCamp Brighton)
 
Codeception introduction and use in Yii
Codeception introduction and use in YiiCodeception introduction and use in Yii
Codeception introduction and use in Yii
 
Acceptance & Functional Testing with Codeception - Devspace 2015
Acceptance & Functional Testing with Codeception - Devspace 2015 Acceptance & Functional Testing with Codeception - Devspace 2015
Acceptance & Functional Testing with Codeception - Devspace 2015
 
Better Page Object Handling with Loadable Component Pattern
Better Page Object Handling with Loadable Component PatternBetter Page Object Handling with Loadable Component Pattern
Better Page Object Handling with Loadable Component Pattern
 

Ähnlich wie Automate testing with behat, selenium, phantom js and nightwatch.js (5)

Meaningful UI Test Automation
Meaningful UI Test AutomationMeaningful UI Test Automation
Meaningful UI Test AutomationRahul Verma
 
Meaningful UI Test Automation
Meaningful UI Test AutomationMeaningful UI Test Automation
Meaningful UI Test AutomationRahul Verma
 
Automated perf optimization - html5 dev conf
Automated perf optimization - html5 dev confAutomated perf optimization - html5 dev conf
Automated perf optimization - html5 dev confMatthew Lancaster
 
Agile engineering environment 50 minutes or less
Agile engineering environment   50 minutes or lessAgile engineering environment   50 minutes or less
Agile engineering environment 50 minutes or lessVernon Stinebaker
 
How to achieve security, reliability, and productivity in less time
How to achieve security, reliability, and productivity in less timeHow to achieve security, reliability, and productivity in less time
How to achieve security, reliability, and productivity in less timeRogue Wave Software
 
Top 13 best front end web development tools to consider in 2021
Top 13 best front end web development tools to consider in 2021Top 13 best front end web development tools to consider in 2021
Top 13 best front end web development tools to consider in 2021Samaritan InfoTech
 
FSV308-Culture Shift How to Move a Global Financial Services Organization to ...
FSV308-Culture Shift How to Move a Global Financial Services Organization to ...FSV308-Culture Shift How to Move a Global Financial Services Organization to ...
FSV308-Culture Shift How to Move a Global Financial Services Organization to ...Amazon Web Services
 
What if you could eliminate the hidden costs of development?
What if you could eliminate the hidden costs of development?What if you could eliminate the hidden costs of development?
What if you could eliminate the hidden costs of development?Rogue Wave Software
 
Live Webinar- Making Test Automation 10x Faster for Continuous Delivery- By R...
Live Webinar- Making Test Automation 10x Faster for Continuous Delivery- By R...Live Webinar- Making Test Automation 10x Faster for Continuous Delivery- By R...
Live Webinar- Making Test Automation 10x Faster for Continuous Delivery- By R...RapidValue
 
QA Role in Agile Teams
QA Role in Agile Teams QA Role in Agile Teams
QA Role in Agile Teams Synerzip
 
SAPUI5/OpenUI5 - Continuous Integration
SAPUI5/OpenUI5 - Continuous IntegrationSAPUI5/OpenUI5 - Continuous Integration
SAPUI5/OpenUI5 - Continuous IntegrationPeter Muessig
 
DevOps 2017 Conf: evolving from automated to continuous
DevOps 2017 Conf: evolving from automated to continuousDevOps 2017 Conf: evolving from automated to continuous
DevOps 2017 Conf: evolving from automated to continuousArthur Hicken
 

Ähnlich wie Automate testing with behat, selenium, phantom js and nightwatch.js (5) (20)

Meaningful UI Test Automation
Meaningful UI Test AutomationMeaningful UI Test Automation
Meaningful UI Test Automation
 
Meaningful UI Test Automation
Meaningful UI Test AutomationMeaningful UI Test Automation
Meaningful UI Test Automation
 
SEO consultant Dubai
SEO consultant DubaiSEO consultant Dubai
SEO consultant Dubai
 
SEO packages Dubai
SEO packages DubaiSEO packages Dubai
SEO packages Dubai
 
Webinar-DevOps.pdf
Webinar-DevOps.pdfWebinar-DevOps.pdf
Webinar-DevOps.pdf
 
Automated perf optimization - html5 dev conf
Automated perf optimization - html5 dev confAutomated perf optimization - html5 dev conf
Automated perf optimization - html5 dev conf
 
Agile Engineering Environment – 2017
Agile Engineering Environment – 2017Agile Engineering Environment – 2017
Agile Engineering Environment – 2017
 
Agile Engineering Environment – 2017
Agile Engineering Environment – 2017Agile Engineering Environment – 2017
Agile Engineering Environment – 2017
 
Agile engineering environment 50 minutes or less
Agile engineering environment   50 minutes or lessAgile engineering environment   50 minutes or less
Agile engineering environment 50 minutes or less
 
DevOps on AWS
DevOps on AWSDevOps on AWS
DevOps on AWS
 
How to achieve security, reliability, and productivity in less time
How to achieve security, reliability, and productivity in less timeHow to achieve security, reliability, and productivity in less time
How to achieve security, reliability, and productivity in less time
 
Top 13 best front end web development tools to consider in 2021
Top 13 best front end web development tools to consider in 2021Top 13 best front end web development tools to consider in 2021
Top 13 best front end web development tools to consider in 2021
 
FSV308-Culture Shift How to Move a Global Financial Services Organization to ...
FSV308-Culture Shift How to Move a Global Financial Services Organization to ...FSV308-Culture Shift How to Move a Global Financial Services Organization to ...
FSV308-Culture Shift How to Move a Global Financial Services Organization to ...
 
Unit testing for project managers
Unit testing for project managersUnit testing for project managers
Unit testing for project managers
 
What if you could eliminate the hidden costs of development?
What if you could eliminate the hidden costs of development?What if you could eliminate the hidden costs of development?
What if you could eliminate the hidden costs of development?
 
Live Webinar- Making Test Automation 10x Faster for Continuous Delivery- By R...
Live Webinar- Making Test Automation 10x Faster for Continuous Delivery- By R...Live Webinar- Making Test Automation 10x Faster for Continuous Delivery- By R...
Live Webinar- Making Test Automation 10x Faster for Continuous Delivery- By R...
 
QA Role in Agile Teams
QA Role in Agile Teams QA Role in Agile Teams
QA Role in Agile Teams
 
SAPUI5/OpenUI5 - Continuous Integration
SAPUI5/OpenUI5 - Continuous IntegrationSAPUI5/OpenUI5 - Continuous Integration
SAPUI5/OpenUI5 - Continuous Integration
 
DevOps 2017 Conf: evolving from automated to continuous
DevOps 2017 Conf: evolving from automated to continuousDevOps 2017 Conf: evolving from automated to continuous
DevOps 2017 Conf: evolving from automated to continuous
 
Automate you Appium test like a pro!
Automate you Appium test like a pro!Automate you Appium test like a pro!
Automate you Appium test like a pro!
 

Mehr von Faichi Solutions

Automate estimates, resource loading , and sprint plans!
Automate estimates, resource loading , and sprint plans! Automate estimates, resource loading , and sprint plans!
Automate estimates, resource loading , and sprint plans! Faichi Solutions
 
Chronic care management_success_story1.3
Chronic care management_success_story1.3Chronic care management_success_story1.3
Chronic care management_success_story1.3Faichi Solutions
 
Health Application Integration with (Electronic Health Records) EHR systems
Health Application Integration with (Electronic Health Records) EHR systemsHealth Application Integration with (Electronic Health Records) EHR systems
Health Application Integration with (Electronic Health Records) EHR systemsFaichi Solutions
 
Success stories web application ui & analytics
Success stories web application ui & analyticsSuccess stories web application ui & analytics
Success stories web application ui & analyticsFaichi Solutions
 
Management ui for_enterprise_network_security
Management ui for_enterprise_network_securityManagement ui for_enterprise_network_security
Management ui for_enterprise_network_securityFaichi Solutions
 
Project Management Nightmares For Startups By Rahul Sudame
Project Management Nightmares For Startups By Rahul SudameProject Management Nightmares For Startups By Rahul Sudame
Project Management Nightmares For Startups By Rahul SudameFaichi Solutions
 
Offshore development center (odc) setup up by faichi solutions - Case Study
Offshore development center (odc) setup up by faichi solutions - Case StudyOffshore development center (odc) setup up by faichi solutions - Case Study
Offshore development center (odc) setup up by faichi solutions - Case StudyFaichi Solutions
 
Case study - Application Re architecture (ODC)
Case study - Application Re architecture (ODC)Case study - Application Re architecture (ODC)
Case study - Application Re architecture (ODC)Faichi Solutions
 
Mobile Application Development - Creating generic framework for mobile applic...
Mobile Application Development - Creating generic framework for mobile applic...Mobile Application Development - Creating generic framework for mobile applic...
Mobile Application Development - Creating generic framework for mobile applic...Faichi Solutions
 
Case Study - Developing Drupal Framework For ePublishing Platform Using Agile...
Case Study - Developing Drupal Framework For ePublishing Platform Using Agile...Case Study - Developing Drupal Framework For ePublishing Platform Using Agile...
Case Study - Developing Drupal Framework For ePublishing Platform Using Agile...Faichi Solutions
 

Mehr von Faichi Solutions (11)

Automate estimates, resource loading , and sprint plans!
Automate estimates, resource loading , and sprint plans! Automate estimates, resource loading , and sprint plans!
Automate estimates, resource loading , and sprint plans!
 
Project Estimation Tool
Project Estimation Tool Project Estimation Tool
Project Estimation Tool
 
Chronic care management_success_story1.3
Chronic care management_success_story1.3Chronic care management_success_story1.3
Chronic care management_success_story1.3
 
Health Application Integration with (Electronic Health Records) EHR systems
Health Application Integration with (Electronic Health Records) EHR systemsHealth Application Integration with (Electronic Health Records) EHR systems
Health Application Integration with (Electronic Health Records) EHR systems
 
Success stories web application ui & analytics
Success stories web application ui & analyticsSuccess stories web application ui & analytics
Success stories web application ui & analytics
 
Management ui for_enterprise_network_security
Management ui for_enterprise_network_securityManagement ui for_enterprise_network_security
Management ui for_enterprise_network_security
 
Project Management Nightmares For Startups By Rahul Sudame
Project Management Nightmares For Startups By Rahul SudameProject Management Nightmares For Startups By Rahul Sudame
Project Management Nightmares For Startups By Rahul Sudame
 
Offshore development center (odc) setup up by faichi solutions - Case Study
Offshore development center (odc) setup up by faichi solutions - Case StudyOffshore development center (odc) setup up by faichi solutions - Case Study
Offshore development center (odc) setup up by faichi solutions - Case Study
 
Case study - Application Re architecture (ODC)
Case study - Application Re architecture (ODC)Case study - Application Re architecture (ODC)
Case study - Application Re architecture (ODC)
 
Mobile Application Development - Creating generic framework for mobile applic...
Mobile Application Development - Creating generic framework for mobile applic...Mobile Application Development - Creating generic framework for mobile applic...
Mobile Application Development - Creating generic framework for mobile applic...
 
Case Study - Developing Drupal Framework For ePublishing Platform Using Agile...
Case Study - Developing Drupal Framework For ePublishing Platform Using Agile...Case Study - Developing Drupal Framework For ePublishing Platform Using Agile...
Case Study - Developing Drupal Framework For ePublishing Platform Using Agile...
 

Kürzlich hochgeladen

Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKJago de Vreede
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 

Kürzlich hochgeladen (20)

Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 

Automate testing with behat, selenium, phantom js and nightwatch.js (5)

  • 1. ©2017 Faichi Solutions Pvt. Ltd. Automate Testing with Behat, Selenium, PhantomJs and Nightwatch.js
  • 2. ©2017 Faichi Solutions Pvt. Ltd. 2 Nikhil Sukul Senior Drupal Architect Faichi Solutions LLC nikhilsukul nikhilsukul Nikhil is an open source enthusiast and contributor to Drupal and its community. He has an overall software experience of 17+ years and has been active in Drupal space since last 9 years. Speakers, who? Gaurav Bajpai Senior Drupal Developer Faichi Solutions LLC gaurav02b gaurav-bajpai Gaurav is an active member and contributor to Drupal community. His overall Drupal experience is 5+ years. He is Acquia certified developer.
  • 8. ©2017 Faichi Solutions Pvt. Ltd. What is Testing
  • 9. ©2017 Faichi Solutions Pvt. Ltd. 9 • In general, testing is finding out how well something works, • Software testing is the process of evaluation a software item to detect differences between given input and expected output.
  • 10. ©2017 Faichi Solutions Pvt. Ltd. How to do Testing
  • 11. ©2017 Faichi Solutions Pvt. Ltd. 11
  • 12. ©2017 Faichi Solutions Pvt. Ltd. Why Testing
  • 13. ©2017 Faichi Solutions Pvt. Ltd. 13 • To point out the defects and errors made during the development phases. • Makes Customer’s reliability and their satisfaction in the application. • Effective performance of the software. • Application resulting to failure is very expensive in future or in later stages of the development.
  • 14. ©2017 Faichi Solutions Pvt. Ltd. 14
  • 15. ©2017 Faichi Solutions Pvt. Ltd. Who will Test?
  • 18. ©2017 Faichi Solutions Pvt. Ltd. They will Test
  • 19. ©2017 Faichi Solutions Pvt. Ltd. Types of Testing (By Execution)
  • 20. ©2017 Faichi Solutions Pvt. Ltd. 20 Manual Testing Automation TestingManual Testing Automation Testing
  • 21. ©2017 Faichi Solutions Pvt. Ltd. 21 Automation Testing Manual Testing It is very much helpful in regressions testing. To execute the test cases first time. Runs test cases significantly faster than human resources. Running tests manually can be very time consuming. Good for automating the Build Verification Testing (BVT) . To execute the Build Verification Testing (BVT) is very mundane and tiresome. Initial cost is high. Manual testing requires less cost than automation.
  • 22. ©2017 Faichi Solutions Pvt. Ltd. 22 Automated Testing
  • 23. ©2017 Faichi Solutions Pvt. Ltd. 23 Real browser testing Real Browsers are running and performing functions or commands in front of users in UI. Examples of Real browsers are Google Chrome, Firefox, and Internet Explorer etc.
  • 24. ©2017 Faichi Solutions Pvt. Ltd. 24 Headless browser testing • Headless browsers are basically web browsers that without a graphical user interface. • Examples of Headless browsers are PhantomJS and ZombieJS etc.
  • 25. ©2017 Faichi Solutions Pvt. Ltd. 25 Real vs Headless browser testing • Headless Browsers faster than real browsers: – Real browsers take time opening, rendering html, CSS, Javascript and images while headless browsers don’t require it. Headless browsers will start performing functions without waiting for page to load completely. • Headless browsers are not representing real users: – user bugs like images are crashing or not as UI is not showing up is very difficult to detect in headless browsers. • Error detection in real browsers is easy pesy: – In Real browser as functions are performing in front of user and he can interact with it so he can easily detect where the tests goes fail. And can easily debug if anything goes wrong. • Headless browsers does not support Ajax.
  • 26. ©2017 Faichi Solutions Pvt. Ltd. 26
  • 27. ©2017 Faichi Solutions Pvt. Ltd. 27 Selenium WebDriver is a collection of open source APIs which are used to automate the testing of a web application and it is platform-independent.
  • 28. ©2017 Faichi Solutions Pvt. Ltd. 28 How Selenium WebDriver works? You can Download Selenium Jar from http://selenium- release.storage.googleapis.com/index.html Chrome Driver IE Driver
  • 29. ©2017 Faichi Solutions Pvt. Ltd. 29 • Behat is an open source Behavior-Driven Development framework for PHP. • Behat is a tool to test the behavior of any application, described in special language called Gherkin. • Gherkin is a Business Readable, Domain Specific Language created especially for behavior descriptions. It gives you the ability to remove logic details from behavior tests.
  • 30. ©2017 Faichi Solutions Pvt. Ltd. 30 Feature: Some terse yet descriptive text of what is desired In order to realize a named business value As an explicit system actor I want to gain some beneficial outcome which furthers the goal Scenario: Some determinable business situation Given some precondition And some other precondition When some action by the actor And some other action And yet another action Then some testable outcome is achieved And something else we can check happens too Scenario: A different situation ...
  • 31. ©2017 Faichi Solutions Pvt. Ltd. 31 • Mink is the browser simulator for Behat. • It is a browser emulator abstraction layer. It hides emulator differences behind a single, consistent API. • Mink Support for both in-browser and headless browser emulators. It is a PHP 5.3+ library. You can Download and Install Behat and Mink: http://docs.behat.org/en/v2.5/cookbook/behat_and_mink.html
  • 32. ©2017 Faichi Solutions Pvt. Ltd. 32 “PhantomJS is a scripted, headless browser used for automating web page interaction. PhantomJS provides a JavaScript API enabling automated navigation, screenshots, user behavior and assertions making it a common tool used to run browser-based unit tests in a headless system like a continuous integration environment.” - wikipedia You can Download and Install PhantomJS: http://phantomjs.org/download.html
  • 33. ©2017 Faichi Solutions Pvt. Ltd. 33 • Headless website testing: – Run functional tests along with the frameworks like QUnit, Jasmine, Mocha, Capybara, WebDriver etc. • Screen capture: – taking screen capture programmatically. • The development can be very easier: – While developing the UI, you can write the code by selecting the HTML element wherever you wanted. • Test framework: – PhantomJS itself is not a test framework, it is only used to launch the tests via a suitable test runner. PhantomJS is a good:
  • 34. ©2017 Faichi Solutions Pvt. Ltd. 34 CasperJS is a navigation scripting & testing utility for PhantomJS headless browser, written in Javascript. CasperJs
  • 35. ©2017 Faichi Solutions Pvt. Ltd. 35 • A Browser Automation tool. • It is an easy to use Node.js based End-to-End (E2E) testing solution for browser based apps and websites. • It uses the powerful W3C WebDriver API to perform commands and assertions on DOM elements. You can Download and Install NightWatch.js: http://nightwatchjs.org/getingstarted#installation
  • 36. ©2017 Faichi Solutions Pvt. Ltd. 36 Nightwatch.js architecture
  • 37. ©2017 Faichi Solutions Pvt. Ltd. What to use and when?
  • 38. ©2017 Faichi Solutions Pvt. Ltd. 38
  • 39. ©2017 Faichi Solutions Pvt. Ltd. 39 References: http://www.softwaretestingclass.com/automation-testing-vs-manual-testing/ http://www.teluguone.com/teluguoneUserFiles/Nothing can stop Automation(1).png http://www.seleniumhq.org/projects/ide/selenium-ide.gif http://nightwatchjs.org/guide#theory-of-operation http://www.slideshare.net/sethmcl/join-the-darkside-nightwatchjs https://www.youtube.com/watch?v=-eJ2cZXyJ0E http://www.algoworks.com/blog/choosing-your-automated-testing-frameworks- phantomjscasperjs-vs-selenium/ http://craveco.de/posts/2016/03/16/part-2-automated-drupal-testing-behat- selenium-and-headless-firefox http://www.pngall.com/wp-content/uploads/2016/06/Browsers- Transparent.png http://economictimes.indiatimes.com/definition/selenium-web-driver http://mink.behat.org/en/latest http://phantomjs.org https://upload.wikimedia.org/wikipedia/commons/thumb/b/b3/Terminalicon2.p ng/480px-Terminalicon2.png http://shashikantjagtap.net/running-behat-scenarios-with-pahntomjs
  • 40.
  • 41. 41 CONNECT WITH US, ASK FOR A DEMO ! Faichi Solutions, LLC 640 W. California Ave Suite 210 Sunnyvale, CA 94086 Phone: +1 (408) 769-4941 Email: inform@faichi.com
  • 42. FAICHI SOLUTIONS PVT LTD USA: OFFICE NO. 230, 640 WEST CALIFORNIA AVENUE SUITE 210 SUNNYVALE, CA 94086 TEL: +1 (408) 769-4941 INDIA: ACCORD IT PARK, BANER ROAD, PUNE, MAHARASHATRA-411045 PH. NO. +91-20-65291435 THANK YOU