SlideShare a Scribd company logo
1 of 33
Download to read offline
April 2014 / v0.21.0
Introduction to Protractor
Florian Fesseler
RIA Architect
✉ffesseler@kapit.fr
☏ @ffesseler
2
Agenda
• What is Protractor
• Testing Quandrants
• Selenium/WebDriver
• Comparison with existing
tools
• Test Automation
Architecture
• Code Vs View Based
• What to test
• How to organize tests
• How to use it
• Installation
• Usage/API
• Debugging
• Build/CI Integration
3
Protractor
… “is an end to end test framework for AngularJS applications built on top of WebDriverJS.
Protractor runs tests against your application running in a real browser, interacting with it as a user
would.”
4
Testing Quadrants
5
Testing Quadrants
Protractor
6
End To End Testing
Testing Vocabulary
Functional
testing
Web
Integration
testing
Customer
testing
Acceptance
testing
GUI Testing
7
• Test all layers of the application
• Simulate user interactions
• Functional Testing for webapp => Automating browsers
Functional Testing
8
Automating browsers
Selenium WebDriver
Tests Scripts
9
Automating browsers : WebDriver API
Selenium WebDriver
WebDriver API
Remote/Local
Selenium Server
JSON Wire
Protocol
10
Automating browsers : WebDriver API Bindings
Selenium WebDriver
WebDriver API
Bindings
Remote/Local
Selenium Server
JSON Wire
Protocol
Java
Ruby
node.js
PHP
Python
…
11
Automating browsers : WebDriverJS
Selenium WebDriver
WebDriver API
Bindings
Remote/Local
Selenium Server
JSON Wire
Protocol
Java
Ruby
node.js
PHP
Python
…
(WebDriverJS)
12
Automating browsers : Browsers implementations
Selenium WebDriver
WebDriver API
Bindings
Remote/Local
Selenium Server
JSON Wire
Protocol
Java
Ruby
node.js
PHP
Python
…
(WebDriverJS) InternetExplorerDriver
13
• Built on top of WebDriverJS
• Add AngularJS integration
• Waits for AngularJS to be bootstrapped
• Listen to AngularJS internals ($http, $timeout, …) to determine when to go to the next steps
• Provide 2 sets of API :
• Wrapped WebdriverJS API
• + New API AngularJS specific (find by binding, repeaters, …)
• Provide tools to help debugging
• Facilitator for setting up (download & launch) easily a local RemoteWebDriver and
launching tests for Chrome, Firefox & IE
• Saucelabs integration
Protractor
14
• Ng-scenario
• First e2e framework for AngularJS
• Deprecated probably because
• JS Sandbox limitations
• Other limitations (login screen not on angular, …)
• Reinventing the wheel
• Protractor is kind of ng-scenario but based on a standard
• Nightwatch.js
• Also built on top of WebDriverJS but without AngularJS support
• Casperjs
• Only target headless browsers : PhantomJS, SlimerJS
• Doesn’t use selenium
Comparison with existing/similar tools
15
Protractor Usage
16
• Install protractor npm module
• Add a config file
• Add some tests
• Update selenium server + Browser Driver
• Launch selenium server + Browser Driver
• Launch tests
• Let’s try it with the well known angular-app 
Installation & Tests launching
17
• API
• 3 globals :
• browser : browser navigation methods + WebDriverJS wrapped (browser.driver)
• element : find & interacting with elements
• by : locator strategies
• https://github.com/angular/protractor/blob/master/docs/api.md
• https://github.com/angular/protractor/blob/master/spec/basic/findelements_spec.js
• Debugging
• Pause + step by step tests
• browser.pause();
• Use API interactively
• Element explorer utility
• Preparing the app
• onPrepare
Usage
18
• With grunt
• Get/Update selenium webdriver
• Npm install grunt-shell
• Launching selenium webdriver :
• npm install grunt-protractor-webdriver --save-dev
• Launching protractor
• npm install grunt-protractor-runner --save-dev
• Reporting
• Add jasmine JUnitXMLReporter in onPrepare function
Automating installation & launch
19
• Doesn’t handle manual angular bootstrap
• Take care of how you do polling
• Take care of the browser support (not tied to protractor itself actually)
• https://github.com/angular/protractor/blob/master/docs/browser-setup.md
Caveats/Limitations
20
Functional Test architecture
21
Testing Pyramid
• High quality comes from a strategy
that combines unit testing,
integration testing and functional
testing.
• Unit tests are the foundation of the
quality
22
Ice cream cone anti-pattern
23
Functional tests limitations
• Fragile
• Coupled to the UI (or Model)
• -> Need to
• Isolate changes
• Decouple interface from tests
• Isolate complexity
• Slow
• Don’t try to test eveything
• Start with smoke tests and build on top of that
• Hard to debug
• Keep tests small
• Keep tests isolated
24
Application Driver
Tests
Application Driver
Selenium
Browser
25
Application Driver
• Put complexity in an application driver
• Isolate changes
• Ease manipulation for the QA team
• DSL around the business side rather than technical side
• Use Page Object Pattern
• Demo
• View Centric Vs Model Centric approch
26
Conclusion
27
Conclusion
• Can use it as of today 
• Don’t invest anymore on ng-scenario
• Docs & debugging tools are getting better
• New features coming : tests sharding, …
• But still in beta version
• Lots of API changes
• Code used in demo :
• https://github.com/ffesseler/angular-app/tree/protractor
28
Summary
• Protactor is a tool to do functional testing for your angularjs app
• Based on Selenium Webdriver
• Provide AngularJS specific APIs (Model centric) on top of webdriverjs
• Provide tools to help you start quickly
• Provide tools to help you debug easily
• Unit tests are the foundation of your test strategy
• Create a DSL to test your app based on Page Object Pattern
29
Other talks
• What I learned from 2 large AngularJS apps
• How to « deploy » AngularJS inside your orgnaization
• Everything about tests in AngularJS
Thanks !
• Florian Fesseler
• Architecte RIA
✉ffesseler@kapit.fr
☏ @ffesseler
31
• Services et logiciels RIA depuis 2005
• 50 experts et 4 pôles dédiés aux RIA :
• Méthodologie et Assurance Qualité
• Experience Utilisateur (UX) et
Ergonomie-Design
• Architecture et Développement HTML5/JS,
Flex, Java,…
• Centre de recherche sur les techno RIA,
les usages collaboratifs et les nouvelles
interactions utilisateurs
• Fournisseur de composants
innovants : lab.kapit.fr
• Depuis 2008, + de 15 000 développeurs
• Data Visualization (gratuit et commercial)
• Outils de développement (open source)
• Fournisseur d’applications
d’entreprise
• Savoir-faire de l’édition logicielle
adapté au Service
• Conduite de projet Agile : KapITerative
(Scrum, Kanban, Lean)
• Service outillé vs. Offshore
• Editeur de logiciel : www.iobeya.com
• 1ere solution de management visuel
(« réunion post-it™ ») pour le Lean
Management, l’Agile, le Brainstorming,…
• +40 clients grands comptes,
+15 000 utilisateurs quotidien,
+40 pays
KAP IT : RIA pour entreprise depuis 2005
Applications
Métier
Applications
B2B/B2C
Composants
iObeya
RIA
32
Une offre complète pour les applications métiers
Audit et Conseil
• Méthodologie et organisation
• Architecture et développement
• Ergonomie/Design IHM
• Qualité et industrialisation
Recherche & Créativité
• Benchmarking et Veille
• Brainstorming, Conception
collaborative
• Prototypage itératif
• Cadrage de projet
Projets de A-Z
• Stratégie Produit, Accompagnement
utilisateur
• Création et modernisation d’applications
métiers, Extensions progiciels (ERP, CRM, ...)
• Réalisation de librairies de composants
(BI, BPM, Dashboard, Custom, ...)
• Tierce maintenance agile « all inclusive »
33
Ergonomie
4 pôles d'expertise pour produire des RIA innovantes de haute qualité
Méthodologie Agile
Industrialisation
Test
Assurance
Qualité
Data Visualisation
Outils de développement
Centre R&D
Architecture et
Développement
Design graphique
UI-UX Design
Architecture de l’Info. &
Conception IHM
Accessibilité
HTML5 / JS
Node.js
iOS / Android / Windows 8
PHP / .NET
Flex
J2EE
Nouveaux usages
Nouvelles interactions

More Related Content

What's hot

Test Automation and Selenium
Test Automation and SeleniumTest Automation and Selenium
Test Automation and SeleniumKarapet Sarkisyan
 
Selenium Tutorial For Beginners | What Is Selenium? | Selenium Automation Tes...
Selenium Tutorial For Beginners | What Is Selenium? | Selenium Automation Tes...Selenium Tutorial For Beginners | What Is Selenium? | Selenium Automation Tes...
Selenium Tutorial For Beginners | What Is Selenium? | Selenium Automation Tes...Edureka!
 
Appium: Automation for Mobile Apps
Appium: Automation for Mobile AppsAppium: Automation for Mobile Apps
Appium: Automation for Mobile AppsSauce Labs
 
Selenium interview-questions-freshers
Selenium interview-questions-freshersSelenium interview-questions-freshers
Selenium interview-questions-freshersNaga Mani
 
Protractor Testing Automation Tool Framework / Jasmine Reporters
Protractor Testing Automation Tool Framework / Jasmine ReportersProtractor Testing Automation Tool Framework / Jasmine Reporters
Protractor Testing Automation Tool Framework / Jasmine ReportersHaitham Refaat
 
TestNG Annotations in Selenium | Edureka
TestNG Annotations in Selenium | EdurekaTestNG Annotations in Selenium | Edureka
TestNG Annotations in Selenium | EdurekaEdureka!
 
Automation Testing using Selenium
Automation Testing using SeleniumAutomation Testing using Selenium
Automation Testing using SeleniumNaresh Chintalcheru
 
Selenium Page Object Model Using Page Factory | Selenium Tutorial For Beginne...
Selenium Page Object Model Using Page Factory | Selenium Tutorial For Beginne...Selenium Page Object Model Using Page Factory | Selenium Tutorial For Beginne...
Selenium Page Object Model Using Page Factory | Selenium Tutorial For Beginne...Edureka!
 
Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...
Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...
Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...Simplilearn
 
Selenium WebDriver Tutorial For Beginners | What Is Selenium WebDriver | Sele...
Selenium WebDriver Tutorial For Beginners | What Is Selenium WebDriver | Sele...Selenium WebDriver Tutorial For Beginners | What Is Selenium WebDriver | Sele...
Selenium WebDriver Tutorial For Beginners | What Is Selenium WebDriver | Sele...Edureka!
 
Appium Presentation
Appium Presentation Appium Presentation
Appium Presentation OmarUsman6
 

What's hot (20)

Test Automation and Selenium
Test Automation and SeleniumTest Automation and Selenium
Test Automation and Selenium
 
Savitha_Resume
Savitha_ResumeSavitha_Resume
Savitha_Resume
 
Selenium Concepts
Selenium ConceptsSelenium Concepts
Selenium Concepts
 
Selenium Tutorial For Beginners | What Is Selenium? | Selenium Automation Tes...
Selenium Tutorial For Beginners | What Is Selenium? | Selenium Automation Tes...Selenium Tutorial For Beginners | What Is Selenium? | Selenium Automation Tes...
Selenium Tutorial For Beginners | What Is Selenium? | Selenium Automation Tes...
 
Introduction to Selenium Web Driver
Introduction to Selenium Web DriverIntroduction to Selenium Web Driver
Introduction to Selenium Web Driver
 
Appium: Automation for Mobile Apps
Appium: Automation for Mobile AppsAppium: Automation for Mobile Apps
Appium: Automation for Mobile Apps
 
Selenium WebDriver training
Selenium WebDriver trainingSelenium WebDriver training
Selenium WebDriver training
 
Selenium interview-questions-freshers
Selenium interview-questions-freshersSelenium interview-questions-freshers
Selenium interview-questions-freshers
 
Appium
AppiumAppium
Appium
 
Angular 9
Angular 9 Angular 9
Angular 9
 
Protractor Testing Automation Tool Framework / Jasmine Reporters
Protractor Testing Automation Tool Framework / Jasmine ReportersProtractor Testing Automation Tool Framework / Jasmine Reporters
Protractor Testing Automation Tool Framework / Jasmine Reporters
 
Selenium WebDriver FAQ's
Selenium WebDriver FAQ'sSelenium WebDriver FAQ's
Selenium WebDriver FAQ's
 
TestNG Annotations in Selenium | Edureka
TestNG Annotations in Selenium | EdurekaTestNG Annotations in Selenium | Edureka
TestNG Annotations in Selenium | Edureka
 
Automation Testing by Selenium Web Driver
Automation Testing by Selenium Web DriverAutomation Testing by Selenium Web Driver
Automation Testing by Selenium Web Driver
 
Automation Testing using Selenium
Automation Testing using SeleniumAutomation Testing using Selenium
Automation Testing using Selenium
 
Selenium Page Object Model Using Page Factory | Selenium Tutorial For Beginne...
Selenium Page Object Model Using Page Factory | Selenium Tutorial For Beginne...Selenium Page Object Model Using Page Factory | Selenium Tutorial For Beginne...
Selenium Page Object Model Using Page Factory | Selenium Tutorial For Beginne...
 
Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...
Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...
Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...
 
Selenium WebDriver Tutorial For Beginners | What Is Selenium WebDriver | Sele...
Selenium WebDriver Tutorial For Beginners | What Is Selenium WebDriver | Sele...Selenium WebDriver Tutorial For Beginners | What Is Selenium WebDriver | Sele...
Selenium WebDriver Tutorial For Beginners | What Is Selenium WebDriver | Sele...
 
Appium
AppiumAppium
Appium
 
Appium Presentation
Appium Presentation Appium Presentation
Appium Presentation
 

Viewers also liked

Angular UI Testing with Protractor
Angular UI Testing with ProtractorAngular UI Testing with Protractor
Angular UI Testing with ProtractorAndrew Eisenberg
 
Introduction to Protractor
Introduction to ProtractorIntroduction to Protractor
Introduction to ProtractorJie-Wei Wu
 
Automated Testing using JavaScript
Automated Testing using JavaScriptAutomated Testing using JavaScript
Automated Testing using JavaScriptSimon Guest
 
Protractor for angularJS
Protractor for angularJSProtractor for angularJS
Protractor for angularJSKrishna Kumar
 
Automated Web Testing using JavaScript
Automated Web Testing using JavaScriptAutomated Web Testing using JavaScript
Automated Web Testing using JavaScriptSimon Guest
 
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 ProtractorKasun Kodagoda
 
Sharing the pain using Protractor
Sharing the pain using ProtractorSharing the pain using Protractor
Sharing the pain using ProtractorAnand Bagmar
 
Using a protractor
Using a protractorUsing a protractor
Using a protractorfknights
 
ProtractorJS for automated testing of Angular 1.x/2.x applications
ProtractorJS for automated testing of Angular 1.x/2.x applicationsProtractorJS for automated testing of Angular 1.x/2.x applications
ProtractorJS for automated testing of Angular 1.x/2.x applicationsBinary Studio
 
Automated Testing with Cucumber, PhantomJS and Selenium
Automated Testing with Cucumber, PhantomJS and SeleniumAutomated Testing with Cucumber, PhantomJS and Selenium
Automated Testing with Cucumber, PhantomJS and SeleniumDev9Com
 
Сергей Больщиков "Protractor Tips & Tricks"
Сергей Больщиков "Protractor Tips & Tricks"Сергей Больщиков "Protractor Tips & Tricks"
Сергей Больщиков "Protractor Tips & Tricks"Fwdays
 
Web Services Automated Testing via SoapUI Tool
Web Services Automated Testing via SoapUI ToolWeb Services Automated Testing via SoapUI Tool
Web Services Automated Testing via SoapUI ToolSperasoft
 
Protractor style guide - Agile Testers Conference 2016
Protractor style guide - Agile Testers Conference 2016Protractor style guide - Agile Testers Conference 2016
Protractor style guide - Agile Testers Conference 2016Walmyr Lima e Silva Filho
 
Große Applikationen mit AngularJS
Große Applikationen mit AngularJSGroße Applikationen mit AngularJS
Große Applikationen mit AngularJSSebastian Springer
 
Selenium Based Visual Test Automation
Selenium Based Visual Test AutomationSelenium Based Visual Test Automation
Selenium Based Visual Test Automationadamcarmi
 

Viewers also liked (20)

Protractor: Tips & Tricks
Protractor: Tips & TricksProtractor: Tips & Tricks
Protractor: Tips & Tricks
 
Angular UI Testing with Protractor
Angular UI Testing with ProtractorAngular UI Testing with Protractor
Angular UI Testing with Protractor
 
Introduction to Protractor
Introduction to ProtractorIntroduction to Protractor
Introduction to Protractor
 
Automated Testing using JavaScript
Automated Testing using JavaScriptAutomated Testing using JavaScript
Automated Testing using JavaScript
 
Protractor for angularJS
Protractor for angularJSProtractor for angularJS
Protractor for angularJS
 
Protractor powerpoint
Protractor powerpointProtractor powerpoint
Protractor powerpoint
 
Automated Web Testing using JavaScript
Automated Web Testing using JavaScriptAutomated Web Testing using JavaScript
Automated Web Testing using JavaScript
 
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
 
Sharing the pain using Protractor
Sharing the pain using ProtractorSharing the pain using Protractor
Sharing the pain using Protractor
 
Protractor training
Protractor trainingProtractor training
Protractor training
 
Using a protractor
Using a protractorUsing a protractor
Using a protractor
 
ProtractorJS for automated testing of Angular 1.x/2.x applications
ProtractorJS for automated testing of Angular 1.x/2.x applicationsProtractorJS for automated testing of Angular 1.x/2.x applications
ProtractorJS for automated testing of Angular 1.x/2.x applications
 
Workshop - E2e tests with protractor
Workshop - E2e tests with protractorWorkshop - E2e tests with protractor
Workshop - E2e tests with protractor
 
Automated Testing with Cucumber, PhantomJS and Selenium
Automated Testing with Cucumber, PhantomJS and SeleniumAutomated Testing with Cucumber, PhantomJS and Selenium
Automated Testing with Cucumber, PhantomJS and Selenium
 
Сергей Больщиков "Protractor Tips & Tricks"
Сергей Больщиков "Protractor Tips & Tricks"Сергей Больщиков "Protractor Tips & Tricks"
Сергей Больщиков "Protractor Tips & Tricks"
 
Web Services Automated Testing via SoapUI Tool
Web Services Automated Testing via SoapUI ToolWeb Services Automated Testing via SoapUI Tool
Web Services Automated Testing via SoapUI Tool
 
Protractor Training - Online training On Skype
Protractor Training - Online training On Skype Protractor Training - Online training On Skype
Protractor Training - Online training On Skype
 
Protractor style guide - Agile Testers Conference 2016
Protractor style guide - Agile Testers Conference 2016Protractor style guide - Agile Testers Conference 2016
Protractor style guide - Agile Testers Conference 2016
 
Große Applikationen mit AngularJS
Große Applikationen mit AngularJSGroße Applikationen mit AngularJS
Große Applikationen mit AngularJS
 
Selenium Based Visual Test Automation
Selenium Based Visual Test AutomationSelenium Based Visual Test Automation
Selenium Based Visual Test Automation
 

Similar to Introduction to Protractor

Web Automation Testing for developers?
Web Automation Testing for developers?Web Automation Testing for developers?
Web Automation Testing for developers?Victor Kushchenko
 
Creating Modular Test-Driven SPAs with Spring and AngularJS
Creating Modular Test-Driven SPAs with Spring and AngularJSCreating Modular Test-Driven SPAs with Spring and AngularJS
Creating Modular Test-Driven SPAs with Spring and AngularJSGunnar Hillert
 
ALM with TFS: From the Drawing Board to the Cloud
ALM with TFS: From the Drawing Board to the CloudALM with TFS: From the Drawing Board to the Cloud
ALM with TFS: From the Drawing Board to the CloudJeremy Likness
 
How to build a JavaScript toolkit
How to build a JavaScript toolkitHow to build a JavaScript toolkit
How to build a JavaScript toolkitMichael Nelson
 
Building share point apps with angularjs
Building share point apps with angularjsBuilding share point apps with angularjs
Building share point apps with angularjsAhmed Elharouny
 
AngularJS One Day Workshop
AngularJS One Day WorkshopAngularJS One Day Workshop
AngularJS One Day WorkshopShyam Seshadri
 
Developing Apps for SharePoint 2013
Developing Apps for SharePoint 2013Developing Apps for SharePoint 2013
Developing Apps for SharePoint 2013SPC Adriatics
 
DevOps on AWS: Accelerating Software Delivery with AWS Developer Tools | AWS ...
DevOps on AWS: Accelerating Software Delivery with AWS Developer Tools | AWS ...DevOps on AWS: Accelerating Software Delivery with AWS Developer Tools | AWS ...
DevOps on AWS: Accelerating Software Delivery with AWS Developer Tools | AWS ...Amazon Web Services
 
Valentine with Angular js - Introduction
Valentine with Angular js - IntroductionValentine with Angular js - Introduction
Valentine with Angular js - IntroductionSenthil Kumar
 
Tools for Software Testing
Tools for Software TestingTools for Software Testing
Tools for Software TestingMohammed Moishin
 
New life inside monolithic application
New life inside monolithic applicationNew life inside monolithic application
New life inside monolithic applicationTaras Matyashovsky
 
The API Lifecycle Series: Exploring Design-First and Code-First Approaches to...
The API Lifecycle Series: Exploring Design-First and Code-First Approaches to...The API Lifecycle Series: Exploring Design-First and Code-First Approaches to...
The API Lifecycle Series: Exploring Design-First and Code-First Approaches to...SmartBear
 
Nightwatch JS for End to End Tests
Nightwatch JS for End to End TestsNightwatch JS for End to End Tests
Nightwatch JS for End to End TestsSriram Angajala
 
Optimus XPages: An Explosion of Techniques and Best Practices
Optimus XPages: An Explosion of Techniques and Best PracticesOptimus XPages: An Explosion of Techniques and Best Practices
Optimus XPages: An Explosion of Techniques and Best PracticesTeamstudio
 
Introduction to Azure Functions
Introduction to Azure FunctionsIntroduction to Azure Functions
Introduction to Azure FunctionsCallon Campbell
 

Similar to Introduction to Protractor (20)

Web Automation Testing for developers?
Web Automation Testing for developers?Web Automation Testing for developers?
Web Automation Testing for developers?
 
Creating Modular Test-Driven SPAs with Spring and AngularJS
Creating Modular Test-Driven SPAs with Spring and AngularJSCreating Modular Test-Driven SPAs with Spring and AngularJS
Creating Modular Test-Driven SPAs with Spring and AngularJS
 
ALM with TFS: From the Drawing Board to the Cloud
ALM with TFS: From the Drawing Board to the CloudALM with TFS: From the Drawing Board to the Cloud
ALM with TFS: From the Drawing Board to the Cloud
 
How to build a JavaScript toolkit
How to build a JavaScript toolkitHow to build a JavaScript toolkit
How to build a JavaScript toolkit
 
Building share point apps with angularjs
Building share point apps with angularjsBuilding share point apps with angularjs
Building share point apps with angularjs
 
Automated Browser Testing
Automated Browser TestingAutomated Browser Testing
Automated Browser Testing
 
AngularJS Basics
AngularJS BasicsAngularJS Basics
AngularJS Basics
 
AngularJS One Day Workshop
AngularJS One Day WorkshopAngularJS One Day Workshop
AngularJS One Day Workshop
 
Test automation proposal
Test automation proposalTest automation proposal
Test automation proposal
 
Automated Testing in DevOps
Automated Testing in DevOpsAutomated Testing in DevOps
Automated Testing in DevOps
 
Developing Apps for SharePoint 2013
Developing Apps for SharePoint 2013Developing Apps for SharePoint 2013
Developing Apps for SharePoint 2013
 
DevOps on AWS: Accelerating Software Delivery with AWS Developer Tools | AWS ...
DevOps on AWS: Accelerating Software Delivery with AWS Developer Tools | AWS ...DevOps on AWS: Accelerating Software Delivery with AWS Developer Tools | AWS ...
DevOps on AWS: Accelerating Software Delivery with AWS Developer Tools | AWS ...
 
Valentine with Angular js - Introduction
Valentine with Angular js - IntroductionValentine with Angular js - Introduction
Valentine with Angular js - Introduction
 
Tools for Software Testing
Tools for Software TestingTools for Software Testing
Tools for Software Testing
 
New life inside monolithic application
New life inside monolithic applicationNew life inside monolithic application
New life inside monolithic application
 
The API Lifecycle Series: Exploring Design-First and Code-First Approaches to...
The API Lifecycle Series: Exploring Design-First and Code-First Approaches to...The API Lifecycle Series: Exploring Design-First and Code-First Approaches to...
The API Lifecycle Series: Exploring Design-First and Code-First Approaches to...
 
Protractor survival guide
Protractor survival guideProtractor survival guide
Protractor survival guide
 
Nightwatch JS for End to End Tests
Nightwatch JS for End to End TestsNightwatch JS for End to End Tests
Nightwatch JS for End to End Tests
 
Optimus XPages: An Explosion of Techniques and Best Practices
Optimus XPages: An Explosion of Techniques and Best PracticesOptimus XPages: An Explosion of Techniques and Best Practices
Optimus XPages: An Explosion of Techniques and Best Practices
 
Introduction to Azure Functions
Introduction to Azure FunctionsIntroduction to Azure Functions
Introduction to Azure Functions
 

Recently uploaded

Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 

Recently uploaded (20)

Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 

Introduction to Protractor

  • 1. April 2014 / v0.21.0 Introduction to Protractor Florian Fesseler RIA Architect ✉ffesseler@kapit.fr ☏ @ffesseler
  • 2. 2 Agenda • What is Protractor • Testing Quandrants • Selenium/WebDriver • Comparison with existing tools • Test Automation Architecture • Code Vs View Based • What to test • How to organize tests • How to use it • Installation • Usage/API • Debugging • Build/CI Integration
  • 3. 3 Protractor … “is an end to end test framework for AngularJS applications built on top of WebDriverJS. Protractor runs tests against your application running in a real browser, interacting with it as a user would.”
  • 6. 6 End To End Testing Testing Vocabulary Functional testing Web Integration testing Customer testing Acceptance testing GUI Testing
  • 7. 7 • Test all layers of the application • Simulate user interactions • Functional Testing for webapp => Automating browsers Functional Testing
  • 9. 9 Automating browsers : WebDriver API Selenium WebDriver WebDriver API Remote/Local Selenium Server JSON Wire Protocol
  • 10. 10 Automating browsers : WebDriver API Bindings Selenium WebDriver WebDriver API Bindings Remote/Local Selenium Server JSON Wire Protocol Java Ruby node.js PHP Python …
  • 11. 11 Automating browsers : WebDriverJS Selenium WebDriver WebDriver API Bindings Remote/Local Selenium Server JSON Wire Protocol Java Ruby node.js PHP Python … (WebDriverJS)
  • 12. 12 Automating browsers : Browsers implementations Selenium WebDriver WebDriver API Bindings Remote/Local Selenium Server JSON Wire Protocol Java Ruby node.js PHP Python … (WebDriverJS) InternetExplorerDriver
  • 13. 13 • Built on top of WebDriverJS • Add AngularJS integration • Waits for AngularJS to be bootstrapped • Listen to AngularJS internals ($http, $timeout, …) to determine when to go to the next steps • Provide 2 sets of API : • Wrapped WebdriverJS API • + New API AngularJS specific (find by binding, repeaters, …) • Provide tools to help debugging • Facilitator for setting up (download & launch) easily a local RemoteWebDriver and launching tests for Chrome, Firefox & IE • Saucelabs integration Protractor
  • 14. 14 • Ng-scenario • First e2e framework for AngularJS • Deprecated probably because • JS Sandbox limitations • Other limitations (login screen not on angular, …) • Reinventing the wheel • Protractor is kind of ng-scenario but based on a standard • Nightwatch.js • Also built on top of WebDriverJS but without AngularJS support • Casperjs • Only target headless browsers : PhantomJS, SlimerJS • Doesn’t use selenium Comparison with existing/similar tools
  • 16. 16 • Install protractor npm module • Add a config file • Add some tests • Update selenium server + Browser Driver • Launch selenium server + Browser Driver • Launch tests • Let’s try it with the well known angular-app  Installation & Tests launching
  • 17. 17 • API • 3 globals : • browser : browser navigation methods + WebDriverJS wrapped (browser.driver) • element : find & interacting with elements • by : locator strategies • https://github.com/angular/protractor/blob/master/docs/api.md • https://github.com/angular/protractor/blob/master/spec/basic/findelements_spec.js • Debugging • Pause + step by step tests • browser.pause(); • Use API interactively • Element explorer utility • Preparing the app • onPrepare Usage
  • 18. 18 • With grunt • Get/Update selenium webdriver • Npm install grunt-shell • Launching selenium webdriver : • npm install grunt-protractor-webdriver --save-dev • Launching protractor • npm install grunt-protractor-runner --save-dev • Reporting • Add jasmine JUnitXMLReporter in onPrepare function Automating installation & launch
  • 19. 19 • Doesn’t handle manual angular bootstrap • Take care of how you do polling • Take care of the browser support (not tied to protractor itself actually) • https://github.com/angular/protractor/blob/master/docs/browser-setup.md Caveats/Limitations
  • 21. 21 Testing Pyramid • High quality comes from a strategy that combines unit testing, integration testing and functional testing. • Unit tests are the foundation of the quality
  • 22. 22 Ice cream cone anti-pattern
  • 23. 23 Functional tests limitations • Fragile • Coupled to the UI (or Model) • -> Need to • Isolate changes • Decouple interface from tests • Isolate complexity • Slow • Don’t try to test eveything • Start with smoke tests and build on top of that • Hard to debug • Keep tests small • Keep tests isolated
  • 25. 25 Application Driver • Put complexity in an application driver • Isolate changes • Ease manipulation for the QA team • DSL around the business side rather than technical side • Use Page Object Pattern • Demo • View Centric Vs Model Centric approch
  • 27. 27 Conclusion • Can use it as of today  • Don’t invest anymore on ng-scenario • Docs & debugging tools are getting better • New features coming : tests sharding, … • But still in beta version • Lots of API changes • Code used in demo : • https://github.com/ffesseler/angular-app/tree/protractor
  • 28. 28 Summary • Protactor is a tool to do functional testing for your angularjs app • Based on Selenium Webdriver • Provide AngularJS specific APIs (Model centric) on top of webdriverjs • Provide tools to help you start quickly • Provide tools to help you debug easily • Unit tests are the foundation of your test strategy • Create a DSL to test your app based on Page Object Pattern
  • 29. 29 Other talks • What I learned from 2 large AngularJS apps • How to « deploy » AngularJS inside your orgnaization • Everything about tests in AngularJS
  • 30. Thanks ! • Florian Fesseler • Architecte RIA ✉ffesseler@kapit.fr ☏ @ffesseler
  • 31. 31 • Services et logiciels RIA depuis 2005 • 50 experts et 4 pôles dédiés aux RIA : • Méthodologie et Assurance Qualité • Experience Utilisateur (UX) et Ergonomie-Design • Architecture et Développement HTML5/JS, Flex, Java,… • Centre de recherche sur les techno RIA, les usages collaboratifs et les nouvelles interactions utilisateurs • Fournisseur de composants innovants : lab.kapit.fr • Depuis 2008, + de 15 000 développeurs • Data Visualization (gratuit et commercial) • Outils de développement (open source) • Fournisseur d’applications d’entreprise • Savoir-faire de l’édition logicielle adapté au Service • Conduite de projet Agile : KapITerative (Scrum, Kanban, Lean) • Service outillé vs. Offshore • Editeur de logiciel : www.iobeya.com • 1ere solution de management visuel (« réunion post-it™ ») pour le Lean Management, l’Agile, le Brainstorming,… • +40 clients grands comptes, +15 000 utilisateurs quotidien, +40 pays KAP IT : RIA pour entreprise depuis 2005 Applications Métier Applications B2B/B2C Composants iObeya RIA
  • 32. 32 Une offre complète pour les applications métiers Audit et Conseil • Méthodologie et organisation • Architecture et développement • Ergonomie/Design IHM • Qualité et industrialisation Recherche & Créativité • Benchmarking et Veille • Brainstorming, Conception collaborative • Prototypage itératif • Cadrage de projet Projets de A-Z • Stratégie Produit, Accompagnement utilisateur • Création et modernisation d’applications métiers, Extensions progiciels (ERP, CRM, ...) • Réalisation de librairies de composants (BI, BPM, Dashboard, Custom, ...) • Tierce maintenance agile « all inclusive »
  • 33. 33 Ergonomie 4 pôles d'expertise pour produire des RIA innovantes de haute qualité Méthodologie Agile Industrialisation Test Assurance Qualité Data Visualisation Outils de développement Centre R&D Architecture et Développement Design graphique UI-UX Design Architecture de l’Info. & Conception IHM Accessibilité HTML5 / JS Node.js iOS / Android / Windows 8 PHP / .NET Flex J2EE Nouveaux usages Nouvelles interactions