Panther loves Symfony apps

Simone D'Amico
Simone D'AmicoSoftware Engineer @ Spreaker at Spreaker
Panther loves
Symfony apps
SIMONE D’AMICO SOFTWARE ENGINEER @ SPREAKER
Not just e2e testing, unleash the full potential!
Me
Simone D’Amico @dymissy
First met Symfony in 2013 (symfony/symfony:>=2.3)
Software Engineer at
Howdy,
let's see
what this
talk is
about.
Panther is a browser testing and
web scraping library that relies on
the WebDriver W3C specification
to manipulate real web browsers.
3
SO, PANTHER...
Yet another functional
testing library. Isn’t it?
It is,
but...
● Are you able to test Javascript
interaction with BrowserKit?
● Are you able to test async calls in
your web page with BrowserKit?
● Are you able to test unexpected
CSS behaviors in your web page
with BrowserKit?
● Are you able to scrape web pages
without installing dedicated
libraries? What if those web
pages use Javascript?
BrowserKit
doesn’t
support JS
(nor CSS)
That’s exactly what
Panther is meant for!
LET ME TELL YOU A STORY
DietWater LTD
DietWater LTD is a
newly founded startup
and its core business is
selling calorie-free
water.
10
They sell the product worldwide on
several marketplaces (eg. Amazon,
Bestbuy, Walmart, etc.) and collect all
the reviews from all marketplaces on
a landing page.
The tech team consists of:
● Matt, the UX/UI designer
● Julia, the frontend developer
● Grace, the backend developer
DietWater LTD
www.spreaker.com
All people
in the
team got
frustrated
for some
reasons...
Matt
Matt is pixel-perfect
addicted and he can’t
stand when
something being
released is not
roughly the same on
different devices.
He’s looking for a way
to automate
cross-browser
testing on multiple
devices.
Julia
Julia is always afraid
the next PR will be the
one that causes a
serious visual
regression.
She’s looking for a
tool which will help
her to create a safety
net against visual
regressions.
Grace
Grace is fed up of
maintaining the
infrastructure needed
for scraping reviews
from all different
marketplaces.
She’s looking for an
automatic and stable
way of retrieving info
from several places.
HOW CAN WE HELP THEM?
Panther
provides a
solution for
each of them
14
Panther in
a nutshell
● Executes real web browsers
(including JS/CSS) thanks to native
support for ChromeDriver and
GeckoDriver
● Implements BrowserKit’s API
● Provides convenient methods for
JS testing (wait, execute script, …)
● Able to take screenshots
● Standalone library for web scraping
https://www.slideshare.net/coopTilleuls/panther-test-your-symfony-apps-with-real-web-browsers
16
Adding Panther to your SF app in 3 steps
(assuming you are using a compatible Docker definition*)
* https://github.com/dunglas/symfony-docker
1
Flex recipe installs the library and
automatically updates the Dockerfile
to install Chromedriver in the image
17
Register PHPUnit extension
Adding Panther to your SF app in 3 steps
(assuming you are using a compatible Docker definition*)
2
* https://github.com/dunglas/symfony-docker
Replace WebTestCase with PantherTestCase
Replace the client with the Panther one
Adding Panther to your SF app in 3 steps
(assuming you are using a compatible Docker definition*)
* https://github.com/dunglas/symfony-docker
3
HOW CAN WE HELP THEM?
Matt - UX/UI Designer
Pain: being able to review web pages
before releasing them on production
Solution: CI step which helps Matt to
see how pages have been rendered
on different browsers and devices as
soon as a new release is being
deployed on stage environment
20
Julia - Frontend Developer
Pain 1: unable to properly test
Javascript interactions and
asynchronous calls
Solution: testing async calls thanks
to waitFor() and DOM APIs
21
Julia - Frontend Developer
Pain 2: afraid of introducing visual
regressions
Solution: screenshots and e2e
testing
22
Grace - Backend Developer
Pain: maintaining the infrastructure
needed for scraping several websites
is costly
Solution: Use Panther client which is
able to make async calls and scrape
Javascript pages
23
TELL ME MORE
How does Panther work?
Under the hood Panther:
● starts your project with the built-in PHP web-server on
localhost:9000
● starts the version of Chromedriver shipped with the library
to automate your local Chrome
● executes the browsing scenario defined in the test with
Chrome in headless mode
How does Panther work?
Under the hood Panther makes use of:
● PHP Webdriver (https://github.com/facebook/php-webdriver)
● BrowserKit and DomCrawler
(https://github.com/symfony/symfony)
● Goutte (https://github.com/FriendsOfPHP/Goutte)
Which browsers shall I use?
Even if Chrome is the default choice, Panther also supports:
● remote browser testing services (Selenium Grid,
SauceLabs and Browserstack)
● Geckodriver (local installation of Firefox)
How does Panther work?
How does Panther work?
How does Panther work?
Pro Tip
PROs
- Standalone
- Nothing to configure
- No web server
- No Selenium
- Easy to maintain
- Easy to integrate
CONs
- Heavy docker image
(~500MB)
- Flaky results
- Functional tests are
slowly and costly
- Requires PHP
expertise
Why would I need Panther when
Javascript with its myriad of testing
tools already suits these needs?
The Symfony team is working hard to provide a modern and
straightforward integration of JavaScript directly in the framework
through the UX initiative.
In this context, having a good browser testing library with JavaScript
support is a must.
DietWater Repository
https://github.com/dymissy/diet-water
Thanks. SIMONE D’AMICO
SOFTWARE ENGINEER @ Spreaker
Get In Touch
simone.damico@spreaker.com
@dymissy
https://www.linkedin.com/in/simonedamico/
Panther loves Symfony apps
Image Credits
1 of 37

Recommended

Behat sauce by
Behat sauceBehat sauce
Behat sauceShashikant Jagtap
3.2K views31 slides
Mobile Web Test Automation: to the Desktop! - Alexander Bayandin - Mobile Tes... by
Mobile Web Test Automation: to the Desktop! - Alexander Bayandin - Mobile Tes...Mobile Web Test Automation: to the Desktop! - Alexander Bayandin - Mobile Tes...
Mobile Web Test Automation: to the Desktop! - Alexander Bayandin - Mobile Tes...Badoo
478 views95 slides
Dockerizing BDD : Ruby-Cucumber Example by
Dockerizing BDD : Ruby-Cucumber ExampleDockerizing BDD : Ruby-Cucumber Example
Dockerizing BDD : Ruby-Cucumber ExampleShashikant Jagtap
2.8K views30 slides
Null July - OWTF - Bharadwaj Machiraju by
Null July - OWTF - Bharadwaj MachirajuNull July - OWTF - Bharadwaj Machiraju
Null July - OWTF - Bharadwaj MachirajuRaghunath G
968 views14 slides
PhoneGap day 2016 EU: Simulating Cordova Plugins in the Browser by
PhoneGap day 2016 EU: Simulating Cordova Plugins in the BrowserPhoneGap day 2016 EU: Simulating Cordova Plugins in the Browser
PhoneGap day 2016 EU: Simulating Cordova Plugins in the BrowserRyan J. Salva
375 views19 slides
Automate Yo' Self by
Automate Yo' SelfAutomate Yo' Self
Automate Yo' SelfJohn Anderson
999 views122 slides

More Related Content

What's hot

JavaScript Unit Testing by
JavaScript Unit TestingJavaScript Unit Testing
JavaScript Unit TestingChristian Johansen
1.1K views74 slides
iOS Parallel Automation: run faster than fast — Viktar Karanevich — SeleniumC... by
iOS Parallel Automation: run faster than fast — Viktar Karanevich — SeleniumC...iOS Parallel Automation: run faster than fast — Viktar Karanevich — SeleniumC...
iOS Parallel Automation: run faster than fast — Viktar Karanevich — SeleniumC...Badoo
1.2K views52 slides
Introduction to composer by
Introduction to composerIntroduction to composer
Introduction to composerJino Hoàng
471 views11 slides
JavaScript Unit Testing by
JavaScript Unit TestingJavaScript Unit Testing
JavaScript Unit TestingChristian Johansen
2.1K views30 slides
@arzumy Dev Setup #klxrb by
@arzumy Dev Setup #klxrb@arzumy Dev Setup #klxrb
@arzumy Dev Setup #klxrbArzumy MD
849 views31 slides
Mangling by
Mangling Mangling
Mangling Olaf Alders
2.6K views21 slides

What's hot(19)

iOS Parallel Automation: run faster than fast — Viktar Karanevich — SeleniumC... by Badoo
iOS Parallel Automation: run faster than fast — Viktar Karanevich — SeleniumC...iOS Parallel Automation: run faster than fast — Viktar Karanevich — SeleniumC...
iOS Parallel Automation: run faster than fast — Viktar Karanevich — SeleniumC...
Badoo1.2K views
Introduction to composer by Jino Hoàng
Introduction to composerIntroduction to composer
Introduction to composer
Jino Hoàng471 views
@arzumy Dev Setup #klxrb by Arzumy MD
@arzumy Dev Setup #klxrb@arzumy Dev Setup #klxrb
@arzumy Dev Setup #klxrb
Arzumy MD849 views
Typescript: Javascript senza problemi by Andrea Boschin by Codemotion
Typescript: Javascript senza problemi by Andrea BoschinTypescript: Javascript senza problemi by Andrea Boschin
Typescript: Javascript senza problemi by Andrea Boschin
Codemotion710 views
The MetaCPAN VM Part II (Using the VM) by Olaf Alders
The MetaCPAN VM Part II (Using the VM)The MetaCPAN VM Part II (Using the VM)
The MetaCPAN VM Part II (Using the VM)
Olaf Alders1.6K views
ZendCon 2015 - Laravel Forge: Hello World to Hello Production by Joe Ferguson
ZendCon 2015 - Laravel Forge: Hello World to Hello ProductionZendCon 2015 - Laravel Forge: Hello World to Hello Production
ZendCon 2015 - Laravel Forge: Hello World to Hello Production
Joe Ferguson1.4K views
The MetaCPAN VM for Dummies Part One (Installation) by Olaf Alders
The MetaCPAN VM for Dummies Part One (Installation)The MetaCPAN VM for Dummies Part One (Installation)
The MetaCPAN VM for Dummies Part One (Installation)
Olaf Alders1.8K views
Devoxx France: Développement JAVA avec un IDE dans le Cloud: Yes we can ! by Florent BENOIT
Devoxx France: Développement JAVA avec un IDE dans le Cloud: Yes we can !Devoxx France: Développement JAVA avec un IDE dans le Cloud: Yes we can !
Devoxx France: Développement JAVA avec un IDE dans le Cloud: Yes we can !
Florent BENOIT1.2K views
Gr8conf EU 2013 Speed up your development: GroovyServ and Grails Improx Plugin by Yasuharu Nakano
Gr8conf EU 2013 Speed up your development: GroovyServ and Grails Improx PluginGr8conf EU 2013 Speed up your development: GroovyServ and Grails Improx Plugin
Gr8conf EU 2013 Speed up your development: GroovyServ and Grails Improx Plugin
Yasuharu Nakano4.3K views
PHP Mega Meetup, Sep, 2020, Anti patterns in php by Ahmed Abdou
PHP Mega Meetup, Sep, 2020, Anti patterns in phpPHP Mega Meetup, Sep, 2020, Anti patterns in php
PHP Mega Meetup, Sep, 2020, Anti patterns in php
Ahmed Abdou86 views

Similar to Panther loves Symfony apps

Technical Tips: Visual Regression Testing and Environment Comparison with Bac... by
Technical Tips: Visual Regression Testing and Environment Comparison with Bac...Technical Tips: Visual Regression Testing and Environment Comparison with Bac...
Technical Tips: Visual Regression Testing and Environment Comparison with Bac...Building Blocks
2.4K views28 slides
Headless browser: puppeteer and git client : GitKraken by
Headless browser: puppeteer and git client : GitKrakenHeadless browser: puppeteer and git client : GitKraken
Headless browser: puppeteer and git client : GitKrakenSheikhMoonwaraAnjumM
58 views54 slides
BBS Selenium & Docker by
BBS Selenium & Docker BBS Selenium & Docker
BBS Selenium & Docker Mustafa Topçuoğulları
263 views12 slides
An introduction to PhantomJS: A headless browser for automation test. by
An introduction to PhantomJS: A headless browser for automation test.An introduction to PhantomJS: A headless browser for automation test.
An introduction to PhantomJS: A headless browser for automation test.BugRaptors
347 views9 slides
Scraping the web with Laravel, Dusk, Docker, and PHP by
Scraping the web with Laravel, Dusk, Docker, and PHPScraping the web with Laravel, Dusk, Docker, and PHP
Scraping the web with Laravel, Dusk, Docker, and PHPPaul Redmond
7.8K views81 slides
DevOps Camp 2017 NYC Local Development using Vagrant by Anthony Alvarez by
DevOps Camp 2017 NYC Local Development using Vagrant by Anthony AlvarezDevOps Camp 2017 NYC Local Development using Vagrant by Anthony Alvarez
DevOps Camp 2017 NYC Local Development using Vagrant by Anthony AlvarezAnthony Alvarez
59 views33 slides

Similar to Panther loves Symfony apps(20)

Technical Tips: Visual Regression Testing and Environment Comparison with Bac... by Building Blocks
Technical Tips: Visual Regression Testing and Environment Comparison with Bac...Technical Tips: Visual Regression Testing and Environment Comparison with Bac...
Technical Tips: Visual Regression Testing and Environment Comparison with Bac...
Building Blocks2.4K views
An introduction to PhantomJS: A headless browser for automation test. by BugRaptors
An introduction to PhantomJS: A headless browser for automation test.An introduction to PhantomJS: A headless browser for automation test.
An introduction to PhantomJS: A headless browser for automation test.
BugRaptors347 views
Scraping the web with Laravel, Dusk, Docker, and PHP by Paul Redmond
Scraping the web with Laravel, Dusk, Docker, and PHPScraping the web with Laravel, Dusk, Docker, and PHP
Scraping the web with Laravel, Dusk, Docker, and PHP
Paul Redmond7.8K views
DevOps Camp 2017 NYC Local Development using Vagrant by Anthony Alvarez by Anthony Alvarez
DevOps Camp 2017 NYC Local Development using Vagrant by Anthony AlvarezDevOps Camp 2017 NYC Local Development using Vagrant by Anthony Alvarez
DevOps Camp 2017 NYC Local Development using Vagrant by Anthony Alvarez
Anthony Alvarez59 views
Puppeteer - Headless Chrome Node API by ubunturk
Puppeteer - Headless Chrome Node APIPuppeteer - Headless Chrome Node API
Puppeteer - Headless Chrome Node API
ubunturk441 views
The Emergence of Choice in the .NET Ecosystem by James Avery
The Emergence of Choice in the .NET EcosystemThe Emergence of Choice in the .NET Ecosystem
The Emergence of Choice in the .NET Ecosystem
James Avery853 views
AD113 Speed Up Your Applications w/ Nginx and PageSpeed by edm00se
AD113  Speed Up Your Applications w/ Nginx and PageSpeedAD113  Speed Up Your Applications w/ Nginx and PageSpeed
AD113 Speed Up Your Applications w/ Nginx and PageSpeed
edm00se1K views
JS digest. Decemebr 2017 by ElifTech
JS digest. Decemebr 2017JS digest. Decemebr 2017
JS digest. Decemebr 2017
ElifTech345 views
vodQA Pune (2019) - Browser automation using dev tools by vodQA
vodQA Pune (2019) - Browser automation using dev toolsvodQA Pune (2019) - Browser automation using dev tools
vodQA Pune (2019) - Browser automation using dev tools
vodQA642 views
How to Develop Progressive Web Apps in Flutter – Step by Step Guide.pptx by BOSC Tech Labs
How to Develop Progressive Web Apps in Flutter – Step by Step Guide.pptxHow to Develop Progressive Web Apps in Flutter – Step by Step Guide.pptx
How to Develop Progressive Web Apps in Flutter – Step by Step Guide.pptx
BOSC Tech Labs13 views
Your Framework for Success: introduction to JavaScript Testing at Scale by Sauce Labs
Your Framework for Success: introduction to JavaScript Testing at ScaleYour Framework for Success: introduction to JavaScript Testing at Scale
Your Framework for Success: introduction to JavaScript Testing at Scale
Sauce Labs270 views
Phonegap android angualr material design by Srinadh Kanugala
Phonegap android angualr material designPhonegap android angualr material design
Phonegap android angualr material design
Srinadh Kanugala764 views
No drama here - E2E-testing django with playwright by Mastacheata1
No drama here - E2E-testing django with playwrightNo drama here - E2E-testing django with playwright
No drama here - E2E-testing django with playwright
Mastacheata1192 views
Build run first web application using flutter for web by Concetto Labs
Build run first web application using flutter for webBuild run first web application using flutter for web
Build run first web application using flutter for web
Concetto Labs98 views
Hacking the Codename One Source Code - Part I - Transcript.pdf by ShaiAlmog1
Hacking the Codename One Source Code - Part I - Transcript.pdfHacking the Codename One Source Code - Part I - Transcript.pdf
Hacking the Codename One Source Code - Part I - Transcript.pdf
ShaiAlmog1294 views
Lunch and learn as3_frameworks by Yuri Visser
Lunch and learn as3_frameworksLunch and learn as3_frameworks
Lunch and learn as3_frameworks
Yuri Visser653 views

Recently uploaded

Generic or specific? Making sensible software design decisions by
Generic or specific? Making sensible software design decisionsGeneric or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisionsBert Jan Schrijver
6 views60 slides
ShortStory_qlora.pptx by
ShortStory_qlora.pptxShortStory_qlora.pptx
ShortStory_qlora.pptxpranathikrishna22
5 views10 slides
Navigating container technology for enhanced security by Niklas Saari by
Navigating container technology for enhanced security by Niklas SaariNavigating container technology for enhanced security by Niklas Saari
Navigating container technology for enhanced security by Niklas SaariMetosin Oy
14 views34 slides
predicting-m3-devopsconMunich-2023.pptx by
predicting-m3-devopsconMunich-2023.pptxpredicting-m3-devopsconMunich-2023.pptx
predicting-m3-devopsconMunich-2023.pptxTier1 app
7 views24 slides
SAP FOR TYRE INDUSTRY.pdf by
SAP FOR TYRE INDUSTRY.pdfSAP FOR TYRE INDUSTRY.pdf
SAP FOR TYRE INDUSTRY.pdfVirendra Rai, PMP
27 views3 slides
Copilot Prompting Toolkit_All Resources.pdf by
Copilot Prompting Toolkit_All Resources.pdfCopilot Prompting Toolkit_All Resources.pdf
Copilot Prompting Toolkit_All Resources.pdfRiccardo Zamana
11 views4 slides

Recently uploaded(20)

Generic or specific? Making sensible software design decisions by Bert Jan Schrijver
Generic or specific? Making sensible software design decisionsGeneric or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisions
Navigating container technology for enhanced security by Niklas Saari by Metosin Oy
Navigating container technology for enhanced security by Niklas SaariNavigating container technology for enhanced security by Niklas Saari
Navigating container technology for enhanced security by Niklas Saari
Metosin Oy14 views
predicting-m3-devopsconMunich-2023.pptx by Tier1 app
predicting-m3-devopsconMunich-2023.pptxpredicting-m3-devopsconMunich-2023.pptx
predicting-m3-devopsconMunich-2023.pptx
Tier1 app7 views
Copilot Prompting Toolkit_All Resources.pdf by Riccardo Zamana
Copilot Prompting Toolkit_All Resources.pdfCopilot Prompting Toolkit_All Resources.pdf
Copilot Prompting Toolkit_All Resources.pdf
Riccardo Zamana11 views
Dev-Cloud Conference 2023 - Continuous Deployment Showdown: Traditionelles CI... by Marc Müller
Dev-Cloud Conference 2023 - Continuous Deployment Showdown: Traditionelles CI...Dev-Cloud Conference 2023 - Continuous Deployment Showdown: Traditionelles CI...
Dev-Cloud Conference 2023 - Continuous Deployment Showdown: Traditionelles CI...
Marc Müller42 views
Unmasking the Dark Art of Vectored Exception Handling: Bypassing XDR and EDR ... by Donato Onofri
Unmasking the Dark Art of Vectored Exception Handling: Bypassing XDR and EDR ...Unmasking the Dark Art of Vectored Exception Handling: Bypassing XDR and EDR ...
Unmasking the Dark Art of Vectored Exception Handling: Bypassing XDR and EDR ...
Donato Onofri890 views
Introduction to Git Source Control by John Valentino
Introduction to Git Source ControlIntroduction to Git Source Control
Introduction to Git Source Control
John Valentino5 views
Top-5-production-devconMunich-2023.pptx by Tier1 app
Top-5-production-devconMunich-2023.pptxTop-5-production-devconMunich-2023.pptx
Top-5-production-devconMunich-2023.pptx
Tier1 app8 views
Advanced API Mocking Techniques by Dimpy Adhikary
Advanced API Mocking TechniquesAdvanced API Mocking Techniques
Advanced API Mocking Techniques
Dimpy Adhikary23 views
Ports-and-Adapters Architecture for Embedded HMI by Burkhard Stubert
Ports-and-Adapters Architecture for Embedded HMIPorts-and-Adapters Architecture for Embedded HMI
Ports-and-Adapters Architecture for Embedded HMI
Burkhard Stubert21 views
.NET Developer Conference 2023 - .NET Microservices mit Dapr – zu viel Abstra... by Marc Müller
.NET Developer Conference 2023 - .NET Microservices mit Dapr – zu viel Abstra....NET Developer Conference 2023 - .NET Microservices mit Dapr – zu viel Abstra...
.NET Developer Conference 2023 - .NET Microservices mit Dapr – zu viel Abstra...
Marc Müller41 views
Quality Engineer: A Day in the Life by John Valentino
Quality Engineer: A Day in the LifeQuality Engineer: A Day in the Life
Quality Engineer: A Day in the Life
John Valentino6 views
Bootstrapping vs Venture Capital.pptx by Zeljko Svedic
Bootstrapping vs Venture Capital.pptxBootstrapping vs Venture Capital.pptx
Bootstrapping vs Venture Capital.pptx
Zeljko Svedic12 views
Dapr Unleashed: Accelerating Microservice Development by Miroslav Janeski
Dapr Unleashed: Accelerating Microservice DevelopmentDapr Unleashed: Accelerating Microservice Development
Dapr Unleashed: Accelerating Microservice Development
Miroslav Janeski12 views

Panther loves Symfony apps

  • 1. Panther loves Symfony apps SIMONE D’AMICO SOFTWARE ENGINEER @ SPREAKER Not just e2e testing, unleash the full potential!
  • 2. Me Simone D’Amico @dymissy First met Symfony in 2013 (symfony/symfony:>=2.3) Software Engineer at
  • 3. Howdy, let's see what this talk is about. Panther is a browser testing and web scraping library that relies on the WebDriver W3C specification to manipulate real web browsers. 3
  • 4. SO, PANTHER... Yet another functional testing library. Isn’t it?
  • 5. It is, but... ● Are you able to test Javascript interaction with BrowserKit? ● Are you able to test async calls in your web page with BrowserKit? ● Are you able to test unexpected CSS behaviors in your web page with BrowserKit? ● Are you able to scrape web pages without installing dedicated libraries? What if those web pages use Javascript?
  • 8. LET ME TELL YOU A STORY
  • 9. DietWater LTD DietWater LTD is a newly founded startup and its core business is selling calorie-free water.
  • 10. 10
  • 11. They sell the product worldwide on several marketplaces (eg. Amazon, Bestbuy, Walmart, etc.) and collect all the reviews from all marketplaces on a landing page. The tech team consists of: ● Matt, the UX/UI designer ● Julia, the frontend developer ● Grace, the backend developer DietWater LTD
  • 12. www.spreaker.com All people in the team got frustrated for some reasons... Matt Matt is pixel-perfect addicted and he can’t stand when something being released is not roughly the same on different devices. He’s looking for a way to automate cross-browser testing on multiple devices. Julia Julia is always afraid the next PR will be the one that causes a serious visual regression. She’s looking for a tool which will help her to create a safety net against visual regressions. Grace Grace is fed up of maintaining the infrastructure needed for scraping reviews from all different marketplaces. She’s looking for an automatic and stable way of retrieving info from several places.
  • 13. HOW CAN WE HELP THEM?
  • 15. Panther in a nutshell ● Executes real web browsers (including JS/CSS) thanks to native support for ChromeDriver and GeckoDriver ● Implements BrowserKit’s API ● Provides convenient methods for JS testing (wait, execute script, …) ● Able to take screenshots ● Standalone library for web scraping https://www.slideshare.net/coopTilleuls/panther-test-your-symfony-apps-with-real-web-browsers
  • 16. 16 Adding Panther to your SF app in 3 steps (assuming you are using a compatible Docker definition*) * https://github.com/dunglas/symfony-docker 1 Flex recipe installs the library and automatically updates the Dockerfile to install Chromedriver in the image
  • 17. 17 Register PHPUnit extension Adding Panther to your SF app in 3 steps (assuming you are using a compatible Docker definition*) 2 * https://github.com/dunglas/symfony-docker
  • 18. Replace WebTestCase with PantherTestCase Replace the client with the Panther one Adding Panther to your SF app in 3 steps (assuming you are using a compatible Docker definition*) * https://github.com/dunglas/symfony-docker 3
  • 19. HOW CAN WE HELP THEM?
  • 20. Matt - UX/UI Designer Pain: being able to review web pages before releasing them on production Solution: CI step which helps Matt to see how pages have been rendered on different browsers and devices as soon as a new release is being deployed on stage environment 20
  • 21. Julia - Frontend Developer Pain 1: unable to properly test Javascript interactions and asynchronous calls Solution: testing async calls thanks to waitFor() and DOM APIs 21
  • 22. Julia - Frontend Developer Pain 2: afraid of introducing visual regressions Solution: screenshots and e2e testing 22
  • 23. Grace - Backend Developer Pain: maintaining the infrastructure needed for scraping several websites is costly Solution: Use Panther client which is able to make async calls and scrape Javascript pages 23
  • 25. How does Panther work? Under the hood Panther: ● starts your project with the built-in PHP web-server on localhost:9000 ● starts the version of Chromedriver shipped with the library to automate your local Chrome ● executes the browsing scenario defined in the test with Chrome in headless mode
  • 26. How does Panther work? Under the hood Panther makes use of: ● PHP Webdriver (https://github.com/facebook/php-webdriver) ● BrowserKit and DomCrawler (https://github.com/symfony/symfony) ● Goutte (https://github.com/FriendsOfPHP/Goutte)
  • 27. Which browsers shall I use? Even if Chrome is the default choice, Panther also supports: ● remote browser testing services (Selenium Grid, SauceLabs and Browserstack) ● Geckodriver (local installation of Firefox)
  • 32. PROs - Standalone - Nothing to configure - No web server - No Selenium - Easy to maintain - Easy to integrate CONs - Heavy docker image (~500MB) - Flaky results - Functional tests are slowly and costly - Requires PHP expertise
  • 33. Why would I need Panther when Javascript with its myriad of testing tools already suits these needs? The Symfony team is working hard to provide a modern and straightforward integration of JavaScript directly in the framework through the UX initiative. In this context, having a good browser testing library with JavaScript support is a must.
  • 35. Thanks. SIMONE D’AMICO SOFTWARE ENGINEER @ Spreaker Get In Touch simone.damico@spreaker.com @dymissy https://www.linkedin.com/in/simonedamico/