SlideShare a Scribd company logo
1 of 30
Download to read offline
SHARING THE PAIN –
PROTRACTOR &
WEBDRIVER
Nikitha Iyer
Developer
Anand Bagmar
Software Quality Evangelist
@BagmarAnand
about.me/anand.bagmar
ABOUT US
@NikithaIyer
Why are you here?
Case Study
DOMAIN
USER BASE
USAGE
SINGLE PAGE APPLICATION
Disclaimer
Why Protractor?
TEAM OWNS QUALITY
Testing ≠ Testers
Quality is a Team Responsibility
Unit (xUnit / JavaScript)
Component
Integration
View
Web Service
UI
Manual / Exploratory
P
e
r
f
o
r
m
a
n
c
e
S
e
c
u
r
i
t
y
Accessibility
TEST PYRAMID
TEAM COMPOSITION & SKILLS
OPTIONS LOOKED AT
q Cucumber-JVM / Cucumber-Ruby
q WebDriver-JS
q Protractor
Challenges
CHALLENGES - JAVASCRIPT
What is Test Automation?
Synchronous,
Step-by-Step execution
ASynchronous
Callbacks & Promises!
Power of JavaScript?
CHALLENGES – BROWSER (& OS) SUPPORT
Browser / Driver Why? Challenges
phantomJS Headless execution
-  easier for developers
-  Seamless CI
integration
-  Officially not
recommended by
Protractor
Chrome -  End-user
requirement
-  Excellent for
development &
testing
-  Certain elements
“not visible” – though
worked with Firefox
Firefox -  End-user
requirement
-  Worked locally
-  Worked in CI – in
headless (xvfb), but
NOT for maps
-  Worked in headless
mode (xvfb) in
vagrant
CHALLENGES – BUILD TOOL INTEGRATION
Gulp-angular-protractor
Gulp-protractor
Protractor
Selenium-WebDriver
Gulp
CHALLENGES - ANGULAR
Type Example
Angular Directives Ex: ng-repeat, ng-model
Custom Directives Ex: third party libraries providing
multi-column select, Sliders for
range, Charts
Working with non-Angular Ex: Login, Admin
CHALLENGES - DEBUGGING
Setting breakpoints while handling promises
CHALLENGES – MAPS
Overcoming the
Challenges
SOLUTIONS – SIMPLIFY BUILD TOOL INTEGRATION
Protractor
Selenium-WebDriver
Gulp
SOLUTIONS – DETERMINISTIC TEST DATA
q Same Test Data in all environments / tenants
q  Minimal Environment specific configuration
q Intelligent ‘before’ & ‘after’ setups
SOLUTIONS – UTILITIES
Page functions
-  Common behavior
-  Non-angular
Screenshots with
counters
Unique output
directory names
JS Console warnings
& errors
Chart functions
CSV loader
Modals & Alerts
File Upload
File Download
Custom Locators
Configurations
SOLUTIONS - LEARN
•  JavaScript
•  Angular
•  Protractor
DID WE SOLVE ALL THE PROBLEMS?
JUST KIDDING!!!
Of course, NO!!
-  Maps
-  Reports
-  How many and where to put “assertions”?
-  Use Soft-asserts
YES!!!
OUR TAKEAWAYS FROM THIS PAIN & GAIN!
q  Choose tech-stack based on context
q  Experiment & Fail-Fast!
q  Proper Cost-Value evaluation
q  Manage Risk (what to automate – now / later, and what NOT
to automate)
q  Keep learning & sharing – new and better solutions
28
REFERENCES
Page Objects – Google - https://code.google.com/p/selenium/wiki/PageObjects
Page Objects – Martin Fowler - http://martinfowler.com/bliki/PageObject.html
Perils of Page-Object Pattern – Anand Bagmar -
http://essenceoftesting.blogspot.in/2014/09/perils-of-page-object-pattern.html
Protractor – https://docs.angularjs.org/guide/e2e-testing,
‪http://www.protractortest.org/#/
Learn Protractor for Angular – ‪https://docs.angularjs.org/tutorial
Sample project – ‪https://github.com/NikithaIyer/angular-phonecat-e2e
@BagmarAnand
about.me/anand.bagmar
THANK YOU
@NikithaIyer

More Related Content

What's hot

What's hot (20)

Lets cook cucumber !!
Lets cook cucumber !!Lets cook cucumber !!
Lets cook cucumber !!
 
Role of Automation in Testing
Role of Automation in TestingRole of Automation in Testing
Role of Automation in Testing
 
Client-Side Performance Testing
Client-Side Performance TestingClient-Side Performance Testing
Client-Side Performance Testing
 
The what, why and how of web analytics testing
The what, why and how of web analytics testingThe what, why and how of web analytics testing
The what, why and how of web analytics testing
 
Selenium with protractor
Selenium with protractorSelenium with protractor
Selenium with protractor
 
Better End-to-End Testing with Page Objects Model using Protractor
Better End-to-End Testing with Page Objects Model using ProtractorBetter End-to-End Testing with Page Objects Model using Protractor
Better End-to-End Testing with Page Objects Model using Protractor
 
Protractor Tutorial Quality in Agile 2015
Protractor Tutorial Quality in Agile 2015Protractor Tutorial Quality in Agile 2015
Protractor Tutorial Quality in Agile 2015
 
Protractor overview
Protractor overviewProtractor overview
Protractor overview
 
What is WAAT?
What is WAAT?What is WAAT?
What is WAAT?
 
Cucumber ppt
Cucumber pptCucumber ppt
Cucumber ppt
 
Protractor training
Protractor trainingProtractor training
Protractor training
 
Introduction to Protractor
Introduction to ProtractorIntroduction to Protractor
Introduction to Protractor
 
Using The Page Object Pattern
Using The Page Object PatternUsing The Page Object Pattern
Using The Page Object Pattern
 
APIs: A Better Alternative to Page Objects
APIs: A Better Alternative to Page ObjectsAPIs: A Better Alternative to Page Objects
APIs: A Better Alternative to Page Objects
 
Protractor survival guide
Protractor survival guideProtractor survival guide
Protractor survival guide
 
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
 
Protractor end-to-end testing framework for angular js
Protractor   end-to-end testing framework for angular jsProtractor   end-to-end testing framework for angular js
Protractor end-to-end testing framework for angular js
 
AngularJS and Protractor
AngularJS and ProtractorAngularJS and Protractor
AngularJS and Protractor
 
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
 
Automated Web Testing using JavaScript
Automated Web Testing using JavaScriptAutomated Web Testing using JavaScript
Automated Web Testing using JavaScript
 

Viewers also liked

Integration Testing in Enterprises using TaaS
Integration Testing in Enterprises using TaaSIntegration Testing in Enterprises using TaaS
Integration Testing in Enterprises using TaaS
Anand Bagmar
 
Keyword Driven Testing
Keyword Driven TestingKeyword Driven Testing
Keyword Driven Testing
Maveryx
 

Viewers also liked (20)

Protractor: Tips & Tricks
Protractor: Tips & TricksProtractor: Tips & Tricks
Protractor: Tips & Tricks
 
Test Data - Food for your Test Automation Framework
Test Data - Food for your Test Automation FrameworkTest Data - Food for your Test Automation Framework
Test Data - Food for your Test Automation Framework
 
Automating Web Analytics
Automating Web AnalyticsAutomating Web Analytics
Automating Web Analytics
 
Client-Side Performance Testing
Client-Side Performance TestingClient-Side Performance Testing
Client-Side Performance Testing
 
Perils of Page-Object Pattern
Perils of Page-Object PatternPerils of Page-Object Pattern
Perils of Page-Object Pattern
 
Patterns in Test Automation
Patterns in Test AutomationPatterns in Test Automation
Patterns in Test Automation
 
Angular UI Testing with Protractor
Angular UI Testing with ProtractorAngular UI Testing with Protractor
Angular UI Testing with Protractor
 
Integration Testing in Enterprises using TaaS
Integration Testing in Enterprises using TaaSIntegration Testing in Enterprises using TaaS
Integration Testing in Enterprises using TaaS
 
Say NO To (More) Selenium Tests
Say NO To (More) Selenium TestsSay NO To (More) Selenium Tests
Say NO To (More) Selenium Tests
 
Agile India 2017 Conference
Agile India 2017 ConferenceAgile India 2017 Conference
Agile India 2017 Conference
 
Sublime Text 2 pro tips
Sublime Text 2 pro tipsSublime Text 2 pro tips
Sublime Text 2 pro tips
 
What is Software Quality and how to measure it?
What is Software Quality and how to measure it?What is Software Quality and how to measure it?
What is Software Quality and how to measure it?
 
Future of Testing, Test Automation and The Quality Analyst
Future of Testing, Test Automation and The Quality AnalystFuture of Testing, Test Automation and The Quality Analyst
Future of Testing, Test Automation and The Quality Analyst
 
Pushknot
PushknotPushknot
Pushknot
 
Testing as a container
Testing as a containerTesting as a container
Testing as a container
 
Create the Future - Innovations in Testing
Create the Future - Innovations in TestingCreate the Future - Innovations in Testing
Create the Future - Innovations in Testing
 
Angular js automation using protractor
Angular js automation using protractorAngular js automation using protractor
Angular js automation using protractor
 
Build the "right" regression suite using Behavior Driven Testing (BDT)
Build the "right" regression suite using Behavior Driven Testing (BDT)Build the "right" regression suite using Behavior Driven Testing (BDT)
Build the "right" regression suite using Behavior Driven Testing (BDT)
 
Keyword driven testing
Keyword driven testingKeyword driven testing
Keyword driven testing
 
Keyword Driven Testing
Keyword Driven TestingKeyword Driven Testing
Keyword Driven Testing
 

Similar to Sharing the pain using Protractor

Tooling for Machine Learning: AWS Products, Open Source Tools, and DevOps Pra...
Tooling for Machine Learning: AWS Products, Open Source Tools, and DevOps Pra...Tooling for Machine Learning: AWS Products, Open Source Tools, and DevOps Pra...
Tooling for Machine Learning: AWS Products, Open Source Tools, and DevOps Pra...
SQUADEX
 
Enabling CD in Enterprises with Testing - Anand Bagmar
Enabling CD in Enterprises with Testing - Anand BagmarEnabling CD in Enterprises with Testing - Anand Bagmar
Enabling CD in Enterprises with Testing - Anand Bagmar
Thoughtworks
 
Automated Performance Testing With J Meter And Maven
Automated  Performance  Testing With  J Meter And  MavenAutomated  Performance  Testing With  J Meter And  Maven
Automated Performance Testing With J Meter And Maven
PerconaPerformance
 
RahulAnand_Testing_5.9years_exp_CV
RahulAnand_Testing_5.9years_exp_CVRahulAnand_Testing_5.9years_exp_CV
RahulAnand_Testing_5.9years_exp_CV
Rahul Anand
 
Quality attributes testing. From Architecture to test acceptance
Quality attributes testing. From Architecture to test acceptanceQuality attributes testing. From Architecture to test acceptance
Quality attributes testing. From Architecture to test acceptance
IT Weekend
 

Similar to Sharing the pain using Protractor (20)

Client-side Performance Testing
Client-side Performance TestingClient-side Performance Testing
Client-side Performance Testing
 
Future of Testing, Test Automation and The Quality Analyst
Future of Testing, Test Automation and The Quality AnalystFuture of Testing, Test Automation and The Quality Analyst
Future of Testing, Test Automation and The Quality Analyst
 
Tooling for Machine Learning: AWS Products, Open Source Tools, and DevOps Pra...
Tooling for Machine Learning: AWS Products, Open Source Tools, and DevOps Pra...Tooling for Machine Learning: AWS Products, Open Source Tools, and DevOps Pra...
Tooling for Machine Learning: AWS Products, Open Source Tools, and DevOps Pra...
 
123 automation framework
123 automation framework123 automation framework
123 automation framework
 
Enabling CD in Enterprises with Testing - Anand Bagmar
Enabling CD in Enterprises with Testing - Anand BagmarEnabling CD in Enterprises with Testing - Anand Bagmar
Enabling CD in Enterprises with Testing - Anand Bagmar
 
Automated Performance Testing With J Meter And Maven
Automated  Performance  Testing With  J Meter And  MavenAutomated  Performance  Testing With  J Meter And  Maven
Automated Performance Testing With J Meter And Maven
 
Agile Testing 2020
Agile Testing 2020Agile Testing 2020
Agile Testing 2020
 
Karim Fanadka
Karim FanadkaKarim Fanadka
Karim Fanadka
 
Integration testing - A&BP CC
Integration testing - A&BP CCIntegration testing - A&BP CC
Integration testing - A&BP CC
 
Serverless in production, an experience report (Going Serverless)
Serverless in production, an experience report (Going Serverless)Serverless in production, an experience report (Going Serverless)
Serverless in production, an experience report (Going Serverless)
 
Serverless in production, an experience report (JeffConf)
Serverless in production, an experience report (JeffConf)Serverless in production, an experience report (JeffConf)
Serverless in production, an experience report (JeffConf)
 
RahulAnand_Testing_5.9years_exp_CV
RahulAnand_Testing_5.9years_exp_CVRahulAnand_Testing_5.9years_exp_CV
RahulAnand_Testing_5.9years_exp_CV
 
Real world selenium resume which gets more job interviews
Real world selenium resume which gets more job interviewsReal world selenium resume which gets more job interviews
Real world selenium resume which gets more job interviews
 
Enabling CD in Enterprises with Testing
Enabling CD in Enterprises with TestingEnabling CD in Enterprises with Testing
Enabling CD in Enterprises with Testing
 
Service pemanas air solahart hp 081313462267
Service pemanas air solahart hp 081313462267Service pemanas air solahart hp 081313462267
Service pemanas air solahart hp 081313462267
 
Neotys PAC 2018 - Ramya Ramalinga Moorthy
Neotys PAC 2018 - Ramya Ramalinga MoorthyNeotys PAC 2018 - Ramya Ramalinga Moorthy
Neotys PAC 2018 - Ramya Ramalinga Moorthy
 
What to Do—Develop Your Own Automation or Use Crowdsourced Testing?
What to Do—Develop Your Own Automation or Use Crowdsourced Testing?What to Do—Develop Your Own Automation or Use Crowdsourced Testing?
What to Do—Develop Your Own Automation or Use Crowdsourced Testing?
 
Testing Vue Apps with Cypress.io (STLJS Meetup April 2018)
Testing Vue Apps with Cypress.io (STLJS Meetup April 2018)Testing Vue Apps with Cypress.io (STLJS Meetup April 2018)
Testing Vue Apps with Cypress.io (STLJS Meetup April 2018)
 
DevOps, A brief introduction to Vagrant & Ansible
DevOps, A brief introduction to Vagrant & AnsibleDevOps, A brief introduction to Vagrant & Ansible
DevOps, A brief introduction to Vagrant & Ansible
 
Quality attributes testing. From Architecture to test acceptance
Quality attributes testing. From Architecture to test acceptanceQuality attributes testing. From Architecture to test acceptance
Quality attributes testing. From Architecture to test acceptance
 

More from Anand Bagmar

More from Anand Bagmar (20)

Eradicate Flaky Tests
Eradicate Flaky TestsEradicate Flaky Tests
Eradicate Flaky Tests
 
Automating the real-user scenarios across multi-apps, and multi-devices
Automating the real-user scenarios across multi-apps, and multi-devicesAutomating the real-user scenarios across multi-apps, and multi-devices
Automating the real-user scenarios across multi-apps, and multi-devices
 
Visual Validation - The missing tip of the automation pyramid @GoT2022
Visual Validation - The missing tip of the automation pyramid @GoT2022Visual Validation - The missing tip of the automation pyramid @GoT2022
Visual Validation - The missing tip of the automation pyramid @GoT2022
 
Design Patterns in Automation
Design Patterns in AutomationDesign Patterns in Automation
Design Patterns in Automation
 
Change Tyres In A Moving Car - Make Functional Test Automation Effective Keynote
Change Tyres In A Moving Car - Make Functional Test Automation Effective KeynoteChange Tyres In A Moving Car - Make Functional Test Automation Effective Keynote
Change Tyres In A Moving Car - Make Functional Test Automation Effective Keynote
 
Rewrite vs Refactor (AgileIndia 2021)
Rewrite vs Refactor (AgileIndia 2021)Rewrite vs Refactor (AgileIndia 2021)
Rewrite vs Refactor (AgileIndia 2021)
 
Next Generation Functional & Visual Testing powered by AI
Next Generation Functional & Visual Testing powered by AINext Generation Functional & Visual Testing powered by AI
Next Generation Functional & Visual Testing powered by AI
 
The Best Test Automation Framework is...
The Best Test Automation Framework is...The Best Test Automation Framework is...
The Best Test Automation Framework is...
 
Eradicate Flaky Tests - AppiumConf 2021
Eradicate Flaky Tests - AppiumConf 2021Eradicate Flaky Tests - AppiumConf 2021
Eradicate Flaky Tests - AppiumConf 2021
 
Getting started with Appium 2.0
Getting started with Appium 2.0Getting started with Appium 2.0
Getting started with Appium 2.0
 
Visual Validation - The missing tip of the automation pyramid @AgileIndia2020
Visual Validation - The missing tip of the automation pyramid @AgileIndia2020Visual Validation - The missing tip of the automation pyramid @AgileIndia2020
Visual Validation - The missing tip of the automation pyramid @AgileIndia2020
 
Selenium Deep Dive
Selenium Deep DiveSelenium Deep Dive
Selenium Deep Dive
 
Does your functional automation really add value?
Does your functional automation really add value?Does your functional automation really add value?
Does your functional automation really add value?
 
Measuring Coverage From E2E Tests
Measuring Coverage From E2E TestsMeasuring Coverage From E2E Tests
Measuring Coverage From E2E Tests
 
Getting started with Visual Testing using Applitools - @TPC, Feb2020
Getting started with Visual Testing using Applitools - @TPC, Feb2020Getting started with Visual Testing using Applitools - @TPC, Feb2020
Getting started with Visual Testing using Applitools - @TPC, Feb2020
 
Visual validation - The missing tip of the automation pyramid @ QA Symposium
Visual validation - The missing tip of the automation pyramid @ QA SymposiumVisual validation - The missing tip of the automation pyramid @ QA Symposium
Visual validation - The missing tip of the automation pyramid @ QA Symposium
 
Collaboration - A Taboo!
Collaboration - A Taboo!Collaboration - A Taboo!
Collaboration - A Taboo!
 
Visual Validation - The Missing Tip of the Automation Pyramid
Visual Validation - The Missing Tip of the Automation PyramidVisual Validation - The Missing Tip of the Automation Pyramid
Visual Validation - The Missing Tip of the Automation Pyramid
 
Measuring Consumer Quality - The Missing Feedback Loop
Measuring Consumer Quality - The Missing Feedback LoopMeasuring Consumer Quality - The Missing Feedback Loop
Measuring Consumer Quality - The Missing Feedback Loop
 
What is Agile Testing? How does Automation help?
What is Agile Testing? How does Automation help?What is Agile Testing? How does Automation help?
What is Agile Testing? How does Automation help?
 

Recently uploaded

%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
masabamasaba
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
masabamasaba
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
masabamasaba
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 

Recently uploaded (20)

Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the Situation
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 

Sharing the pain using Protractor

  • 1. SHARING THE PAIN – PROTRACTOR & WEBDRIVER Nikitha Iyer Developer Anand Bagmar Software Quality Evangelist
  • 3. Why are you here?
  • 11. TEAM OWNS QUALITY Testing ≠ Testers Quality is a Team Responsibility
  • 12. Unit (xUnit / JavaScript) Component Integration View Web Service UI Manual / Exploratory P e r f o r m a n c e S e c u r i t y Accessibility TEST PYRAMID
  • 14. OPTIONS LOOKED AT q Cucumber-JVM / Cucumber-Ruby q WebDriver-JS q Protractor
  • 16. CHALLENGES - JAVASCRIPT What is Test Automation? Synchronous, Step-by-Step execution ASynchronous Callbacks & Promises! Power of JavaScript?
  • 17. CHALLENGES – BROWSER (& OS) SUPPORT Browser / Driver Why? Challenges phantomJS Headless execution -  easier for developers -  Seamless CI integration -  Officially not recommended by Protractor Chrome -  End-user requirement -  Excellent for development & testing -  Certain elements “not visible” – though worked with Firefox Firefox -  End-user requirement -  Worked locally -  Worked in CI – in headless (xvfb), but NOT for maps -  Worked in headless mode (xvfb) in vagrant
  • 18. CHALLENGES – BUILD TOOL INTEGRATION Gulp-angular-protractor Gulp-protractor Protractor Selenium-WebDriver Gulp
  • 19. CHALLENGES - ANGULAR Type Example Angular Directives Ex: ng-repeat, ng-model Custom Directives Ex: third party libraries providing multi-column select, Sliders for range, Charts Working with non-Angular Ex: Login, Admin
  • 20. CHALLENGES - DEBUGGING Setting breakpoints while handling promises
  • 23. SOLUTIONS – SIMPLIFY BUILD TOOL INTEGRATION Protractor Selenium-WebDriver Gulp
  • 24. SOLUTIONS – DETERMINISTIC TEST DATA q Same Test Data in all environments / tenants q  Minimal Environment specific configuration q Intelligent ‘before’ & ‘after’ setups
  • 25. SOLUTIONS – UTILITIES Page functions -  Common behavior -  Non-angular Screenshots with counters Unique output directory names JS Console warnings & errors Chart functions CSV loader Modals & Alerts File Upload File Download Custom Locators Configurations
  • 26. SOLUTIONS - LEARN •  JavaScript •  Angular •  Protractor
  • 27. DID WE SOLVE ALL THE PROBLEMS? JUST KIDDING!!! Of course, NO!! -  Maps -  Reports -  How many and where to put “assertions”? -  Use Soft-asserts YES!!!
  • 28. OUR TAKEAWAYS FROM THIS PAIN & GAIN! q  Choose tech-stack based on context q  Experiment & Fail-Fast! q  Proper Cost-Value evaluation q  Manage Risk (what to automate – now / later, and what NOT to automate) q  Keep learning & sharing – new and better solutions 28
  • 29. REFERENCES Page Objects – Google - https://code.google.com/p/selenium/wiki/PageObjects Page Objects – Martin Fowler - http://martinfowler.com/bliki/PageObject.html Perils of Page-Object Pattern – Anand Bagmar - http://essenceoftesting.blogspot.in/2014/09/perils-of-page-object-pattern.html Protractor – https://docs.angularjs.org/guide/e2e-testing, ‪http://www.protractortest.org/#/ Learn Protractor for Angular – ‪https://docs.angularjs.org/tutorial Sample project – ‪https://github.com/NikithaIyer/angular-phonecat-e2e