Headless BDD & Responsive Test
Automation
Shashikant Jagtap
Twitter: @Shashikant86
Blogs: http://shashikantjagtap.net
Topics
 How BDD Tools Work
 Headless Drivers, BDD and Benefits
 Behat+Zombie &
Cucumber+Poltergeist
 Demo
Cucumber+Cap...
BDD Tools
 Popular BDD Tools Cucumber, Behat
 Web Acceptance Testing Frameworks
Capybara, Mink
 Drivers Selenium, Watir...
Benefits of using Headless Drivers
 Drivers with no reals Browsers
PhantomJS, Zombie
 Fast
 No XVFB, VNC on Linux
 Scr...
Zombie
 NodeJS
 Npm
 Zombie
$ brew install node
$ npm install npm
PhantomJS
 Headless Browser with full JavaScript
Support
$ brew install phantomjs
$ phantomjs your/awesome.js
Setting up Headless Cucumber
 Cucumber + Capybara + Poltergiest
 GitHub :
https://github.com/teampoltergeist/polt
ergeis...
What's There?
 Gemfile
 require 'capybara/poltergeist'
 Register
Capybara.register_driver :poltergeist do |app|
options...
What You Can Do?
 Detect JS Error
 Capture Network Traffic
 Response Headers
 Capture Screenshot
 Play With Cookies
...
Setting up Headless Behat
 Behat + Mink + Zombie
 Zombie On GitHub
https://github.com/assaf/zombie
 Behat + Mink + Zomb...
What's There?
 Composer.json
 Package.json
 "behat/mink-zombie-driver": "*@dev",
 Npm
 node_modules
What You Can Do?
 Make Behat Scenarioes SuperFast
 Response Headers
 Cookies
 Screenshot ? Network Traffic ?
 Stuff C...
Questions?
Headless BDD & Responsive Test Automation
Headless BDD & Responsive Test Automation
Upcoming SlideShare
Loading in...5
×

Headless BDD & Responsive Test Automation

1,123

Published on

This talk is delivered at CukeUp 2014, London. This include using BDD tools like Behat and Cucumber with headless drivers like PhantomJS and ZombieJS.

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,123
On Slideshare
0
From Embeds
0
Number of Embeds
12
Actions
Shares
0
Downloads
6
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Headless BDD & Responsive Test Automation

  1. 1. Headless BDD & Responsive Test Automation Shashikant Jagtap Twitter: @Shashikant86 Blogs: http://shashikantjagtap.net
  2. 2. Topics  How BDD Tools Work  Headless Drivers, BDD and Benefits  Behat+Zombie & Cucumber+Poltergeist  Demo Cucumber+Capybara+Poltergeist  Demo Behat+Mink+Zombie+PhantomJS  Responsive Automation
  3. 3. BDD Tools  Popular BDD Tools Cucumber, Behat  Web Acceptance Testing Frameworks Capybara, Mink  Drivers Selenium, Watir, PhantomJS, Zombie
  4. 4. Benefits of using Headless Drivers  Drivers with no reals Browsers PhantomJS, Zombie  Fast  No XVFB, VNC on Linux  Screenshots and JS Error Detection  Debugging
  5. 5. Zombie  NodeJS  Npm  Zombie $ brew install node $ npm install npm
  6. 6. PhantomJS  Headless Browser with full JavaScript Support $ brew install phantomjs $ phantomjs your/awesome.js
  7. 7. Setting up Headless Cucumber  Cucumber + Capybara + Poltergiest  GitHub : https://github.com/teampoltergeist/polt ergeist  Demo on GitHub: https://github.com/Shashikant86/Poltergeis  Blog: http://shashikantjagtap.net/cucumber- capybara-poltergeist-rockstar-bdd-
  8. 8. What's There?  Gemfile  require 'capybara/poltergeist'  Register Capybara.register_driver :poltergeist do |app| options = { :js_errors => t rue, } Capybara::Poltergeist::Driver.new(app, options) end
  9. 9. What You Can Do?  Detect JS Error  Capture Network Traffic  Response Headers  Capture Screenshot  Play With Cookies  Responsive Automation
  10. 10. Responsive Test Automation  Define ViewPort window_sizes = {        :'320' => { :width => 320, :height => 480 },      :'1026' => { :width => 1026, :height => 1200 },        }  Capybara.current_session.driver.resize(width, height)
  11. 11. Setting up Headless Behat  Behat + Mink + Zombie  Zombie On GitHub https://github.com/assaf/zombie  Behat + Mink + Zombie Demo on GitHub https://github.com/Shashikant86/Behat-Zomb  Blog http://shashikantjagtap.net/using-zombie- js-driver-with-behats-minkextension/
  12. 12. What's There?  Composer.json  Package.json  "behat/mink-zombie-driver": "*@dev",  Npm  node_modules
  13. 13. What You Can Do?  Make Behat Scenarioes SuperFast  Response Headers  Cookies  Screenshot ? Network Traffic ?  Stuff Coming Soon
  14. 14. Questions?
  15. 15. THANK YOU

×