SlideShare a Scribd company logo
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 (20)

PPTX
Setting up Page Object Model in Automation Framework
valuebound
 
PPTX
Reactjs
Neha Sharma
 
PDF
NodeJS for Beginner
Apaichon Punopas
 
PPT
Vue.js Getting Started
Murat Doğan
 
PPTX
Selenium test automation
Srikanth Vuriti
 
PDF
FRONT-END WEB DEVELOPMENT WITH REACTJS
Tran Phong Phu
 
PPTX
Selenium with java
Gousalya Ramachandran
 
PPTX
Selenium WebDriver Tutorial For Beginners | What Is Selenium WebDriver | Sele...
Edureka!
 
PPTX
A Brief Introduction to React.js
Doug Neiner
 
PDF
Karate - powerful and simple framework for REST API automation testing
Roman Liubun
 
PPTX
React-JS.pptx
AnmolPandita7
 
PDF
2015-StarWest presentation on REST-assured
Eing Ong
 
PPTX
Vue js for beginner
Chandrasekar G
 
PPTX
Web api using rest based architecture
Soham Kulkarni
 
PPTX
Node js overview
Eyal Vardi
 
PPTX
Part One: Building Web Apps with the MERN Stack
MongoDB
 
PDF
WEB DEVELOPMENT USING REACT JS
MuthuKumaran Singaravelu
 
PDF
Automation Testing using Selenium
Naresh Chintalcheru
 
PPTX
React JS - A quick introduction tutorial
Mohammed Fazuluddin
 
PPTX
Test Automation and Selenium
Karapet Sarkisyan
 
Setting up Page Object Model in Automation Framework
valuebound
 
Reactjs
Neha Sharma
 
NodeJS for Beginner
Apaichon Punopas
 
Vue.js Getting Started
Murat Doğan
 
Selenium test automation
Srikanth Vuriti
 
FRONT-END WEB DEVELOPMENT WITH REACTJS
Tran Phong Phu
 
Selenium with java
Gousalya Ramachandran
 
Selenium WebDriver Tutorial For Beginners | What Is Selenium WebDriver | Sele...
Edureka!
 
A Brief Introduction to React.js
Doug Neiner
 
Karate - powerful and simple framework for REST API automation testing
Roman Liubun
 
React-JS.pptx
AnmolPandita7
 
2015-StarWest presentation on REST-assured
Eing Ong
 
Vue js for beginner
Chandrasekar G
 
Web api using rest based architecture
Soham Kulkarni
 
Node js overview
Eyal Vardi
 
Part One: Building Web Apps with the MERN Stack
MongoDB
 
WEB DEVELOPMENT USING REACT JS
MuthuKumaran Singaravelu
 
Automation Testing using Selenium
Naresh Chintalcheru
 
React JS - A quick introduction tutorial
Mohammed Fazuluddin
 
Test Automation and Selenium
Karapet Sarkisyan
 

Viewers also liked (20)

PDF
Protractor: Tips & Tricks
Sergey Bolshchikov
 
PPTX
Angular UI Testing with Protractor
Andrew Eisenberg
 
PDF
Introduction to Protractor
Jie-Wei Wu
 
PPTX
Automated Testing using JavaScript
Simon Guest
 
PPTX
Protractor for angularJS
Krishna Kumar
 
PPT
Protractor powerpoint
lindarousselle
 
PDF
Automated Web Testing using JavaScript
Simon Guest
 
PPTX
Better End-to-End Testing with Page Objects Model using Protractor
Kasun Kodagoda
 
PDF
Sharing the pain using Protractor
Anand Bagmar
 
PPTX
Protractor training
Sergiy Stotskiy
 
PPTX
Using a protractor
fknights
 
PPTX
ProtractorJS for automated testing of Angular 1.x/2.x applications
Binary Studio
 
PDF
Workshop - E2e tests with protractor
Walmyr Lima e Silva Filho
 
PPTX
Automated Testing with Cucumber, PhantomJS and Selenium
Dev9Com
 
PDF
Сергей Больщиков "Protractor Tips & Tricks"
Fwdays
 
PDF
Web Services Automated Testing via SoapUI Tool
Sperasoft
 
PPTX
Protractor Training - Online training On Skype
QuickITDotNet Training and Services
 
PDF
Protractor style guide - Agile Testers Conference 2016
Walmyr Lima e Silva Filho
 
PDF
Große Applikationen mit AngularJS
Sebastian Springer
 
PPTX
Selenium Based Visual Test Automation
adamcarmi
 
Protractor: Tips & Tricks
Sergey Bolshchikov
 
Angular UI Testing with Protractor
Andrew Eisenberg
 
Introduction to Protractor
Jie-Wei Wu
 
Automated Testing using JavaScript
Simon Guest
 
Protractor for angularJS
Krishna Kumar
 
Protractor powerpoint
lindarousselle
 
Automated Web Testing using JavaScript
Simon Guest
 
Better End-to-End Testing with Page Objects Model using Protractor
Kasun Kodagoda
 
Sharing the pain using Protractor
Anand Bagmar
 
Protractor training
Sergiy Stotskiy
 
Using a protractor
fknights
 
ProtractorJS for automated testing of Angular 1.x/2.x applications
Binary Studio
 
Workshop - E2e tests with protractor
Walmyr Lima e Silva Filho
 
Automated Testing with Cucumber, PhantomJS and Selenium
Dev9Com
 
Сергей Больщиков "Protractor Tips & Tricks"
Fwdays
 
Web Services Automated Testing via SoapUI Tool
Sperasoft
 
Protractor Training - Online training On Skype
QuickITDotNet Training and Services
 
Protractor style guide - Agile Testers Conference 2016
Walmyr Lima e Silva Filho
 
Große Applikationen mit AngularJS
Sebastian Springer
 
Selenium Based Visual Test Automation
adamcarmi
 
Ad

Similar to Introduction to Protractor (20)

PDF
Carmen Popoviciu - Protractor styleguide | Codemotion Milan 2015
Codemotion
 
PPTX
Protractor Tutorial Quality in Agile 2015
Andrew Eisenberg
 
PPTX
An Introduction to AngularJS End to End Testing using Protractor
Cubet Techno Labs
 
PPTX
Dive into Angular, part 5: Experience
Oleksii Prohonnyi
 
PPTX
Protractor End To End Testing For AngularJS
Knoldus Inc.
 
PDF
Sharing (less) Pain of using Protractor & WebDriver
Anand Bagmar
 
PDF
Effective testing of rich internet applications
Rashwin
 
PPTX
Introduction to Protractor - Habilelabs
HabileLabs
 
PPTX
QA Fes 2016. Александр Хотемской. Обзор ProtractorJS как фреймворка для брауз...
QAFest
 
PDF
Moving from selenium to protractor for test automation
Zoe Gilbert
 
PPTX
Олександр Хотемський “ProtractorJS як інструмент браузерної автоматизації для...
Dakiry
 
PDF
Insights on Protractor testing
Dejan Toteff
 
PDF
11 Top Cross Browser Testing Tools to Know About.pdf
flufftailshop
 
PPTX
Test automation proposal
Mihai-Cristian Fratila
 
PDF
11 Top Cross Browser Testing Tools to Know About.pdf
kalichargn70th171
 
PPTX
Protractor framework architecture with example
shadabgilani
 
PDF
Angularjs Testdriven Development Tim Chaplin
alphonzomckinstryew
 
PDF
ForwardJS 2017 - Fullstack end-to-end Test Automation with node.js
Mek Srunyu Stittri
 
PPTX
Protractor survival guide
László Andrási
 
PDF
How to push a react js application in production and sleep better
Emanuele Rampichini
 
Carmen Popoviciu - Protractor styleguide | Codemotion Milan 2015
Codemotion
 
Protractor Tutorial Quality in Agile 2015
Andrew Eisenberg
 
An Introduction to AngularJS End to End Testing using Protractor
Cubet Techno Labs
 
Dive into Angular, part 5: Experience
Oleksii Prohonnyi
 
Protractor End To End Testing For AngularJS
Knoldus Inc.
 
Sharing (less) Pain of using Protractor & WebDriver
Anand Bagmar
 
Effective testing of rich internet applications
Rashwin
 
Introduction to Protractor - Habilelabs
HabileLabs
 
QA Fes 2016. Александр Хотемской. Обзор ProtractorJS как фреймворка для брауз...
QAFest
 
Moving from selenium to protractor for test automation
Zoe Gilbert
 
Олександр Хотемський “ProtractorJS як інструмент браузерної автоматизації для...
Dakiry
 
Insights on Protractor testing
Dejan Toteff
 
11 Top Cross Browser Testing Tools to Know About.pdf
flufftailshop
 
Test automation proposal
Mihai-Cristian Fratila
 
11 Top Cross Browser Testing Tools to Know About.pdf
kalichargn70th171
 
Protractor framework architecture with example
shadabgilani
 
Angularjs Testdriven Development Tim Chaplin
alphonzomckinstryew
 
ForwardJS 2017 - Fullstack end-to-end Test Automation with node.js
Mek Srunyu Stittri
 
Protractor survival guide
László Andrási
 
How to push a react js application in production and sleep better
Emanuele Rampichini
 
Ad

Recently uploaded (20)

PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PDF
NewMind AI Journal - Weekly Chronicles - July'25 Week II
NewMind AI
 
PDF
Blockchain Transactions Explained For Everyone
CIFDAQ
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PDF
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
PDF
SFWelly Summer 25 Release Highlights July 2025
Anna Loughnan Colquhoun
 
PDF
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PPT
Interview paper part 3, It is based on Interview Prep
SoumyadeepGhosh39
 
PPTX
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
PPTX
MSP360 Backup Scheduling and Retention Best Practices.pptx
MSP360
 
PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PDF
Building Resilience with Digital Twins : Lessons from Korea
SANGHEE SHIN
 
PPTX
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
PDF
Smart Air Quality Monitoring with Serrax AQM190 LITE
SERRAX TECHNOLOGIES LLP
 
PDF
Windsurf Meetup Ottawa 2025-07-12 - Planning Mode at Reliza.pdf
Pavel Shukhman
 
PDF
Why Orbit Edge Tech is a Top Next JS Development Company in 2025
mahendraalaska08
 
PDF
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
PPTX
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
PDF
Persuasive AI: risks and opportunities in the age of digital debate
Speck&Tech
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
NewMind AI Journal - Weekly Chronicles - July'25 Week II
NewMind AI
 
Blockchain Transactions Explained For Everyone
CIFDAQ
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
SFWelly Summer 25 Release Highlights July 2025
Anna Loughnan Colquhoun
 
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
Interview paper part 3, It is based on Interview Prep
SoumyadeepGhosh39
 
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
MSP360 Backup Scheduling and Retention Best Practices.pptx
MSP360
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
Building Resilience with Digital Twins : Lessons from Korea
SANGHEE SHIN
 
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
Smart Air Quality Monitoring with Serrax AQM190 LITE
SERRAX TECHNOLOGIES LLP
 
Windsurf Meetup Ottawa 2025-07-12 - Planning Mode at Reliza.pdf
Pavel Shukhman
 
Why Orbit Edge Tech is a Top Next JS Development Company in 2025
mahendraalaska08
 
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
Persuasive AI: risks and opportunities in the age of digital debate
Speck&Tech
 

Introduction to Protractor

  • 1. April 2014 / v0.21.0 Introduction to Protractor Florian Fesseler RIA Architect ✉[email protected] ☏ @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 ✉[email protected] ☏ @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