Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Testing Any Website Written in Any Language Wit...
Search
Prem Sichanugrist
November 16, 2014
Technology
1
200
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
Tweet
Share
More Decks by Prem Sichanugrist
See All by Prem Sichanugrist
Working with Huge Databases and Tables
sikachu
1
100
What's coming in Rails 5.2, and sneak peek into Rails 6
sikachu
6
6k
Zero-downtime payment platforms
sikachu
2
280
Introduction to Active Support
sikachu
0
200
Hidden gems in Ruby on Rails
sikachu
5
300
Active Support Secrets
sikachu
1
290
Dependencies Testing With Appraisal And Bundler
sikachu
1
480
You have to test multiple versions of your gem's dependencies. You used Appraisal. It's super affective!
sikachu
0
450
Zero-downtime payment platforms
sikachu
1
150
Other Decks in Technology
See All in Technology
30万人の同時アクセスに耐えたい!新サービスの盤石なリリースを支える負荷試験 / SRE Kaigi 2026
genda
4
1.3k
プロポーザルに込める段取り八分
shoheimitani
1
610
SREが向き合う大規模リアーキテクチャ 〜信頼性とアジリティの両立〜
zepprix
0
470
usermode linux without MMU - fosdem2026 kernel devroom
thehajime
0
240
OpenShiftでllm-dを動かそう!
jpishikawa
0
140
小さく始めるBCP ― 多プロダクト環境で始める最初の一歩
kekke_n
1
520
Claude_CodeでSEOを最適化する_AI_Ops_Community_Vol.2__マーケティングx_AIはここまで進化した.pdf
riku_423
2
610
Agent Skils
dip_tech
PRO
0
120
Agile Leadership Summit Keynote 2026
m_seki
1
660
Oracle Cloud Observability and Management Platform - OCI 運用監視サービス概要 -
oracle4engineer
PRO
2
14k
予期せぬコストの急増を障害のように扱う――「コスト版ポストモーテム」の導入とその後の改善
muziyoshiz
1
2k
データの整合性を保ちたいだけなんだ
shoheimitani
8
3.2k
Featured
See All Featured
Balancing Empowerment & Direction
lara
5
890
How Software Deployment tools have changed in the past 20 years
geshan
0
32k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
270
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.4k
Documentation Writing (for coders)
carmenintech
77
5.3k
Faster Mobile Websites
deanohume
310
31k
Embracing the Ebb and Flow
colly
88
5k
The Pragmatic Product Professional
lauravandoore
37
7.1k
Accessibility Awareness
sabderemane
0
56
The SEO Collaboration Effect
kristinabergwall1
0
350
What's in a price? How to price your products and services
michaelherold
247
13k
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