Suche senden
Hochladen
Integration Test Cucumber + Webrat + Selenium
•
8 gefällt mir
•
1,692 views
T
tka
Folgen
Melden
Teilen
Melden
Teilen
1 von 26
Jetzt herunterladen
Downloaden Sie, um offline zu lesen
Empfohlen
Write php deploy everywhere
Write php deploy everywhere
Michelangelo van Dam
Write php deploy everywhere tek11
Write php deploy everywhere tek11
Michelangelo van Dam
Testing frontends with nightwatch & saucelabs
Testing frontends with nightwatch & saucelabs
Tudor Barbu
20160905 - BrisJS - nightwatch testing
20160905 - BrisJS - nightwatch testing
Vladimir Roudakov
[PHP 也有 Day] 垃圾留言守城記 - 用 Laravel 阻擋 SPAM 留言的奮鬥史
[PHP 也有 Day] 垃圾留言守城記 - 用 Laravel 阻擋 SPAM 留言的奮鬥史
Shengyou Fan
Palestra VCR
Palestra VCR
Cássio Marques
Like a Genie from a Lamp: Headless JavaScript Unit Testing with Jasmine and P...
Like a Genie from a Lamp: Headless JavaScript Unit Testing with Jasmine and P...
Rob Friesel
Building websites with Node.ACS
Building websites with Node.ACS
Ricardo Alcocer
Empfohlen
Write php deploy everywhere
Write php deploy everywhere
Michelangelo van Dam
Write php deploy everywhere tek11
Write php deploy everywhere tek11
Michelangelo van Dam
Testing frontends with nightwatch & saucelabs
Testing frontends with nightwatch & saucelabs
Tudor Barbu
20160905 - BrisJS - nightwatch testing
20160905 - BrisJS - nightwatch testing
Vladimir Roudakov
[PHP 也有 Day] 垃圾留言守城記 - 用 Laravel 阻擋 SPAM 留言的奮鬥史
[PHP 也有 Day] 垃圾留言守城記 - 用 Laravel 阻擋 SPAM 留言的奮鬥史
Shengyou Fan
Palestra VCR
Palestra VCR
Cássio Marques
Like a Genie from a Lamp: Headless JavaScript Unit Testing with Jasmine and P...
Like a Genie from a Lamp: Headless JavaScript Unit Testing with Jasmine and P...
Rob Friesel
Building websites with Node.ACS
Building websites with Node.ACS
Ricardo Alcocer
Cool like a Frontend Developer: Grunt, RequireJS, Bower and other Tools
Cool like a Frontend Developer: Grunt, RequireJS, Bower and other Tools
Ryan Weaver
Search and play more than 50 clips
Search and play more than 50 clips
phanhung20
Mastering Grunt
Mastering Grunt
Spencer Handley
Scraping recalcitrant web sites with Python & Selenium
Scraping recalcitrant web sites with Python & Selenium
Roger Barnes
Building com Phing - 7Masters PHP
Building com Phing - 7Masters PHP
iMasters
The Peanut Butter Cup of Web-dev: Plack and single page web apps
The Peanut Butter Cup of Web-dev: Plack and single page web apps
John Anderson
JavaScript APIs - The Web is the Platform
JavaScript APIs - The Web is the Platform
Robert Nyman
Detecting headless browsers
Detecting headless browsers
Sergey Shekyan
Ruby MVC from scratch with Rack
Ruby MVC from scratch with Rack
DonSchado
Real time web (Orbited) at BCNE3
Real time web (Orbited) at BCNE3
Alex Kavanagh
Advanced WordPress Development Environments
Advanced WordPress Development Environments
Beau Lebens
Vuejs testing
Vuejs testing
Greg TAPPERO
Browser Automated Testing Frameworks - Nightwatch.js
Browser Automated Testing Frameworks - Nightwatch.js
Luís Bastião Silva
Retrofit Android by Chris Ollenburg
Retrofit Android by Chris Ollenburg
Trey Robinson
Express JS
Express JS
Designveloper
Introduction to Retrofit
Introduction to Retrofit
Kazuhiro Serizawa
Zombiejs
Zombiejs
Виктор Ткаченко
Ionic으로 모바일앱 만들기 #4
Ionic으로 모바일앱 만들기 #4
성일 한
Rails Girls: Programming, Web Applications and Ruby on Rails
Rails Girls: Programming, Web Applications and Ruby on Rails
DonSchado
Chrome Devtools Protocol via Selenium/Appium (English)
Chrome Devtools Protocol via Selenium/Appium (English)
Kazuaki Matsuo
Browser-level testing
Browser-level testing
Martin Kleppmann
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
Doris Chen
Weitere ähnliche Inhalte
Was ist angesagt?
Cool like a Frontend Developer: Grunt, RequireJS, Bower and other Tools
Cool like a Frontend Developer: Grunt, RequireJS, Bower and other Tools
Ryan Weaver
Search and play more than 50 clips
Search and play more than 50 clips
phanhung20
Mastering Grunt
Mastering Grunt
Spencer Handley
Scraping recalcitrant web sites with Python & Selenium
Scraping recalcitrant web sites with Python & Selenium
Roger Barnes
Building com Phing - 7Masters PHP
Building com Phing - 7Masters PHP
iMasters
The Peanut Butter Cup of Web-dev: Plack and single page web apps
The Peanut Butter Cup of Web-dev: Plack and single page web apps
John Anderson
JavaScript APIs - The Web is the Platform
JavaScript APIs - The Web is the Platform
Robert Nyman
Detecting headless browsers
Detecting headless browsers
Sergey Shekyan
Ruby MVC from scratch with Rack
Ruby MVC from scratch with Rack
DonSchado
Real time web (Orbited) at BCNE3
Real time web (Orbited) at BCNE3
Alex Kavanagh
Advanced WordPress Development Environments
Advanced WordPress Development Environments
Beau Lebens
Vuejs testing
Vuejs testing
Greg TAPPERO
Browser Automated Testing Frameworks - Nightwatch.js
Browser Automated Testing Frameworks - Nightwatch.js
Luís Bastião Silva
Retrofit Android by Chris Ollenburg
Retrofit Android by Chris Ollenburg
Trey Robinson
Express JS
Express JS
Designveloper
Introduction to Retrofit
Introduction to Retrofit
Kazuhiro Serizawa
Zombiejs
Zombiejs
Виктор Ткаченко
Ionic으로 모바일앱 만들기 #4
Ionic으로 모바일앱 만들기 #4
성일 한
Rails Girls: Programming, Web Applications and Ruby on Rails
Rails Girls: Programming, Web Applications and Ruby on Rails
DonSchado
Was ist angesagt?
(19)
Cool like a Frontend Developer: Grunt, RequireJS, Bower and other Tools
Cool like a Frontend Developer: Grunt, RequireJS, Bower and other Tools
Search and play more than 50 clips
Search and play more than 50 clips
Mastering Grunt
Mastering Grunt
Scraping recalcitrant web sites with Python & Selenium
Scraping recalcitrant web sites with Python & Selenium
Building com Phing - 7Masters PHP
Building com Phing - 7Masters PHP
The Peanut Butter Cup of Web-dev: Plack and single page web apps
The Peanut Butter Cup of Web-dev: Plack and single page web apps
JavaScript APIs - The Web is the Platform
JavaScript APIs - The Web is the Platform
Detecting headless browsers
Detecting headless browsers
Ruby MVC from scratch with Rack
Ruby MVC from scratch with Rack
Real time web (Orbited) at BCNE3
Real time web (Orbited) at BCNE3
Advanced WordPress Development Environments
Advanced WordPress Development Environments
Vuejs testing
Vuejs testing
Browser Automated Testing Frameworks - Nightwatch.js
Browser Automated Testing Frameworks - Nightwatch.js
Retrofit Android by Chris Ollenburg
Retrofit Android by Chris Ollenburg
Express JS
Express JS
Introduction to Retrofit
Introduction to Retrofit
Zombiejs
Zombiejs
Ionic으로 모바일앱 만들기 #4
Ionic으로 모바일앱 만들기 #4
Rails Girls: Programming, Web Applications and Ruby on Rails
Rails Girls: Programming, Web Applications and Ruby on Rails
Ähnlich wie Integration Test Cucumber + Webrat + Selenium
Chrome Devtools Protocol via Selenium/Appium (English)
Chrome Devtools Protocol via Selenium/Appium (English)
Kazuaki Matsuo
Browser-level testing
Browser-level testing
Martin Kleppmann
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
Doris Chen
JavaScript performance patterns
JavaScript performance patterns
Stoyan Stefanov
ApacheCon 2005
ApacheCon 2005
Adam Trachtenberg
Consegi 2010 - Dicas de Desenvolvimento Web com Ruby
Consegi 2010 - Dicas de Desenvolvimento Web com Ruby
Fabio Akita
Selenium and Sauce Labs
Selenium and Sauce Labs
hugs
Fisl 11 - Dicas de Desenvolvimento Web com Ruby
Fisl 11 - Dicas de Desenvolvimento Web com Ruby
Fabio Akita
Vue 淺談前端建置工具
Vue 淺談前端建置工具
andyyou
[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVC
Alive Kuo
Go Web Development
Go Web Development
Cheng-Yi Yu
JavaScript Performance Patterns
JavaScript Performance Patterns
Stoyan Stefanov
Selenium再入門
Selenium再入門
Norio Suzuki
Chrome Devtools Protocol via Selenium/Appium (Japanese)
Chrome Devtools Protocol via Selenium/Appium (Japanese)
Kazuaki Matsuo
HTML 5 - Overview
HTML 5 - Overview
Marcelio Leal
GIT, RVM, FIRST HEROKU APP
GIT, RVM, FIRST HEROKU APP
Pavel Tyk
Continuous Integration/Deployment with Docker and Jenkins
Continuous Integration/Deployment with Docker and Jenkins
Francesco Bruni
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Fabio Akita
Resource Registries: Plone Conference 2014
Resource Registries: Plone Conference 2014
Rob Gietema
Workshop KrakYourNet2016 - Web applications hacking Ruby on Rails example
Workshop KrakYourNet2016 - Web applications hacking Ruby on Rails example
Anna Klepacka
Ähnlich wie Integration Test Cucumber + Webrat + Selenium
(20)
Chrome Devtools Protocol via Selenium/Appium (English)
Chrome Devtools Protocol via Selenium/Appium (English)
Browser-level testing
Browser-level testing
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
JavaScript performance patterns
JavaScript performance patterns
ApacheCon 2005
ApacheCon 2005
Consegi 2010 - Dicas de Desenvolvimento Web com Ruby
Consegi 2010 - Dicas de Desenvolvimento Web com Ruby
Selenium and Sauce Labs
Selenium and Sauce Labs
Fisl 11 - Dicas de Desenvolvimento Web com Ruby
Fisl 11 - Dicas de Desenvolvimento Web com Ruby
Vue 淺談前端建置工具
Vue 淺談前端建置工具
[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVC
Go Web Development
Go Web Development
JavaScript Performance Patterns
JavaScript Performance Patterns
Selenium再入門
Selenium再入門
Chrome Devtools Protocol via Selenium/Appium (Japanese)
Chrome Devtools Protocol via Selenium/Appium (Japanese)
HTML 5 - Overview
HTML 5 - Overview
GIT, RVM, FIRST HEROKU APP
GIT, RVM, FIRST HEROKU APP
Continuous Integration/Deployment with Docker and Jenkins
Continuous Integration/Deployment with Docker and Jenkins
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
Resource Registries: Plone Conference 2014
Resource Registries: Plone Conference 2014
Workshop KrakYourNet2016 - Web applications hacking Ruby on Rails example
Workshop KrakYourNet2016 - Web applications hacking Ruby on Rails example
Integration Test Cucumber + Webrat + Selenium
1.
Integration Test Cucumber +
Webrat + Selenium
2.
about me •
a.k.a tka, tkalu • http://www.twitter.com/tkalu • http://www.tkalu.com • http://www.handlino.com
3.
Ruby Tuesday
gugod #6 Integration Test With Cucumber And Webrat weijen #3 rspec Mock Aren't Stub
4.
Source Code http://github.com/tka/it-cws-demo
5.
Cucumber http://cukes.info/
6.
Cucumber
7.
Cucumber :
" "
8.
Webrat http://gitrdoc.com/brynary/webrat http://github.com/brynary/webrat
9.
Webrat visit login_url
fill_in “Login”, :with => “User” fill_in “Password”, :with => “123456” click_button “Log in” http://gitrdoc.com/brynary/webrat/tree/master
10.
Cucumber + Webrat Given
/^ $/ do visit logout_path end And /^ $/ do visit root_path end Then /^ "([^"]*)"$/ do | text | assert_contain text end
11.
Cucumber + Webrat •
cucumber -f pretty features/p5.feature • cucumber -f html features/p5.feature > test.html
12.
,
.... javascript
13.
Browser
14.
Selenium http://seleniumhq.org/
15.
Selenium • Selenium IDE •
elenium Remote Control (RC) • Selenium Grid
16.
Selenium
• FireFox • Linux • Chrome • OS X • Safari • Windows • Opera • IE 7,8 (6 not in the list)
17.
Selenium & Ruby •
gem install selenium-client • require "selenium/client"
18.
Selenium @browser = Selenium::Client::Driver.new
:host => "localhost", :port => 4444, :browser => "*firefox", :url => "http://www.google.com", :timeout_in_second => 60 @browser.start_new_browser_session @browser.open "/" @browser.type "q", "Ruby Tuesday #11" @browser.click "btnG", :wait_for => :page @browser.capture_entire_page_screenshot('/Users/tka/1.png','') puts @browser.text?("Ruby Tuesday #11 |Registrano") http://selenium-client.rubyforge.org/ ruby script/selenium_demo.rb
19.
Webrat + Selenium Webrat.configure
do |config| config.mode = :selenium config.selenium_server_address = 'localhost' config.application_framework = :external end visit 'http://www.google.com' fill_in "q", :with => 'Ruby Tuesday #11' click_button "Google " selenium.wait_for_page_to_load(10) assert_contain "Ruby Tuesday #11 | Registrano" save_and_open_screengrab ruby script/webrat_selenium_demo.rb
20.
Cucumber + Webrat
+ Selenium features/support/env.rb Webrat.configure do |config| config.mode = :rails config.open_error_files = false if ENV["USE_SELENIUM"] config.mode = :selenium config.selenium_browser_key = ENV["SELENIUM_BROWSER"] || "*firefox" if ENV["SELENIUM_SERVER"] config.selenium_server_address = ENV["SELENIUM_SERVER"] end config.application_address = ENV["SELENIUM_APPLICATION"] || "localhost" config.application_port = ENV["SELENIUM_APPLICATION_PORT"] || "3000" end end USE_SELENIUM=1 cucumber
21.
Cucumber profile
config/cucumber.yml selenium: -r features/support/env.rb -r features/support/enhanced.rb -r features/step_definitions features/enhanced cucumber -p selenium http://wiki.github.com/aslakhellesoy/cucumber/setting-up-selenium
22.
VirtualBox •
Vmware • VBoxManage cli • OSX /Applications/VirtualBox.app/Contents/MacOS/VBoxManage •
23.
24.
webrat-0.7.0/lib/webrat/selenium/
location_strategy_javascript/label.js var labelFor = locatedLabel.getAttribute('for'); // IE-- if (labelFor == null && "v"=="v"){ labelFor=locatedLabel.htmlFor } if (labelFor == null && locatedLabel.hasChildNodes()) {
25.
• cronjob •
VM • VM selenium • cucumber + webrat + selenium • ,
26.
Q&A
Jetzt herunterladen