$30 off During Our Annual Pro Sale. View Details »
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
190
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
99
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
190
Hidden gems in Ruby on Rails
sikachu
5
300
Active Support Secrets
sikachu
1
280
Dependencies Testing With Appraisal And Bundler
sikachu
1
420
You have to test multiple versions of your gem's dependencies. You used Appraisal. It's super affective!
sikachu
0
440
Zero-downtime payment platforms
sikachu
1
140
Other Decks in Technology
See All in Technology
1人1サービス開発しているチームでのClaudeCodeの使い方
noayaoshiro
1
280
SREには開発組織全体で向き合う
koh_naga
0
360
AWS Security Agentの紹介/introducing-aws-security-agent
tomoki10
0
300
AI駆動開発の実践とその未来
eltociear
0
120
MLflowで始めるプロンプト管理、評価、最適化
databricksjapan
1
250
OCI Oracle Database Services新機能アップデート(2025/09-2025/11)
oracle4engineer
PRO
1
210
mairuでつくるクレデンシャルレス開発環境 / Credential-less development environment using Mailru
mirakui
5
540
初めてのDatabricks AI/BI Genie
taka_aki
0
200
Haskell を武器にして挑む競技プログラミング ─ 操作的思考から意味モデル思考へ
naoya
6
1.6k
SQLだけでマイグレーションしたい!
makki_d
0
220
Fashion×AI「似合う」を届けるためのWEARのAI戦略
zozotech
PRO
2
820
LLM-Readyなデータ基盤を高速に構築するためのアジャイルデータモデリングの実例
kashira
0
260
Featured
See All Featured
GraphQLの誤解/rethinking-graphql
sonatard
73
11k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
970
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
Scaling GitHub
holman
464
140k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
7.9k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.3k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.3k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
710
Become a Pro
speakerdeck
PRO
31
5.7k
Imperfection Machines: The Place of Print at Facebook
scottboms
269
13k
Agile that works and the tools we love
rasmusluckow
331
21k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.1k
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