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
仕様書駆動AI開発の実践: Issue→Skill→PRテンプレで 再現性を作る
knishioka
2
680
今こそ学びたいKubernetesネットワーク ~CNIが繋ぐNWとプラットフォームの「フラッと」な対話
logica0419
4
330
GitHub Issue Templates + Coding Agentで簡単みんなでIaC/Easy IaC for Everyone with GitHub Issue Templates + Coding Agent
aeonpeople
1
260
OCI Database Management サービス詳細
oracle4engineer
PRO
1
7.4k
コスト削減から「セキュリティと利便性」を担うプラットフォームへ
sansantech
PRO
3
1.6k
pool.ntp.orgに ⾃宅サーバーで 参加してみたら...
tanyorg
0
430
登壇駆動学習のすすめ — CfPのネタの見つけ方と書くときに意識していること
bicstone
3
130
AIと新時代を切り拓く。これからのSREとメルカリIBISの挑戦
0gm
2
3.1k
15 years with Rails and DDD (AI Edition)
andrzejkrzywda
0
200
OWASP Top 10:2025 リリースと 少しの日本語化にまつわる裏話
okdt
PRO
3
840
ファインディの横断SREがTakumi byGMOと取り組む、セキュリティと開発スピードの両立
rvirus0817
1
1.6k
SREじゃなかった僕らがenablingを通じて「SRE実践者」になるまでのリアル / SRE Kaigi 2026
aeonpeople
6
2.5k
Featured
See All Featured
Product Roadmaps are Hard
iamctodd
PRO
55
12k
Embracing the Ebb and Flow
colly
88
5k
SEO for Brand Visibility & Recognition
aleyda
0
4.2k
Paper Plane (Part 1)
katiecoart
PRO
0
4.3k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
96
AI: The stuff that nobody shows you
jnunemaker
PRO
2
270
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
150
First, design no harm
axbom
PRO
2
1.1k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
52
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
170
Raft: Consensus for Rubyists
vanstee
141
7.3k
GraphQLとの向き合い方2022年版
quramy
50
14k
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