Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Testing Any Website Written in Any Language Wit...
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Prem Sichanugrist
November 16, 2014
Technology
240
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Testing Any Website Written in Any Language With Capybara and RSpec
Presented at Barcamp Bangkhen 2014 on November 16, 2014.
Prem Sichanugrist
November 16, 2014
More Decks by Prem Sichanugrist
See All by Prem Sichanugrist
Working with Huge Databases and Tables
sikachu
1
160
What's coming in Rails 5.2, and sneak peek into Rails 6
sikachu
6
6.1k
Zero-downtime payment platforms
sikachu
2
330
Introduction to Active Support
sikachu
0
240
Hidden gems in Ruby on Rails
sikachu
5
330
Active Support Secrets
sikachu
1
320
Dependencies Testing With Appraisal And Bundler
sikachu
1
520
You have to test multiple versions of your gem's dependencies. You used Appraisal. It's super affective!
sikachu
0
500
Zero-downtime payment platforms
sikachu
1
190
Other Decks in Technology
See All in Technology
大型犬好きによるPugの紹介
yamanoku
1
160
~最速でビジネスインパクトを創出する~ Sansanのデータ基盤と活用事例
sansantech
PRO
0
100
初海外で注意すべきこと12選!!!安全快適なre:invent生活にするために
yuuuuuuu168
1
180
React改造してみた
tsukina_7mochi
0
140
Rustuna: Rustによる高速なOptuna実装
pfn
PRO
0
200
20261017福岡devIO 「AIは"良いダッシュボード"を作れるか?
jtakeda
0
210
その Valkey 使いこなしていますか?
onk
PRO
5
1.6k
Optunaの最新リリースv5.0について
pfn
PRO
0
120
事業成長とデータ活用を止めないためのマネジメントへ挑戦
hiracky16
0
410
QA4AI 2026-Oct 生成AI時代の品質保証
tokuty
1
910
Classmethod Company Deck
satoshi7
1
750
スキマバイトという雇用形態は存在しないので、雇用期間1日のアルバイト契約を事業者とワーカーが結ぶ手続きを支えるのがタイミーなんです
akitoshiga
0
210
Featured
See All Featured
The #1 spot is gone: here's how to win anyway
tamaranovitovic
4
1.2k
The Limits of Empathy - UXLibs8
cassininazir
2
730
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.4k
Information Architects: The Missing Link in Design Systems
soysaucechin
1
1.2k
For a Future-Friendly Web
brad_frost
184
10k
Thoughts on Productivity
jonyablonski
76
5.4k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
1
450
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
520
Tell your own story through comics
letsgokoyo
1
1.1k
Large-scale JavaScript Application Architecture
addyosmani
516
110k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
18k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
Transcript
Testing Any Website Written in Any Language With Capybara and
RSpec
Prem Sichanugrist @sikachu /sikachu
Testing
Acceptance Testing
High-level Testing
Assert From User's Perspective
Whole-Stack Testing
Acceptance Testing Frameworks • Cucumber (Ruby) • Mocha (JavaScript (node.js))
• Ranorex (C#, VB.NET)
Capybara + RSpec (Ruby)
Why You Should Write Acceptance Test
(this slide is intentionally left blank)
TL;DR • User flow is well-defined • Prevent future regression
after introducing new feature
Why Capybara + Rspec?
Clean & Clear Syntax
Very Well-Maintained
Very Flexible Easily swapping between drivers
Requirements
Requirements 1. RSpec - Testing Framework
Requirements 1. RSpec - Testing Framework 2. Capybara - Providing
DSL for Testing
Requirements 1. RSpec - Testing Framework 2. Capybara - Providing
DSL for Testing 3. Capybara Webkit - Webkit Backend with JS support
Demo
Steps • Install dependencies using Bundler • RSpec, Capybara, Capybara
Webkit • Run RSpec install • Require Capybara in spec_helper • Set Webkit as the driver • Done, start writing test!
http://git.io/bcbk-testing Demo Source Code
Before we're done ... • Bangkok.rb • Metting every last
Saturday afternoon • http://bit.ly/bangkokrb (Google Groups) • November Meeting - November 29, 2014 • Sign up: http://bit.ly/bangkokrb-nov2014
Thank You! Any Questions? Code: http://git.io/bcbk-testing Slide: http://bit.ly/bcbk-testing Follow me:
https://twitter.com/sikachu