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
180
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
92
What's coming in Rails 5.2, and sneak peek into Rails 6
sikachu
6
6k
Zero-downtime payment platforms
sikachu
2
260
Introduction to Active Support
sikachu
0
170
Hidden gems in Ruby on Rails
sikachu
5
290
Active Support Secrets
sikachu
1
270
Dependencies Testing With Appraisal And Bundler
sikachu
1
350
You have to test multiple versions of your gem's dependencies. You used Appraisal. It's super affective!
sikachu
0
330
Zero-downtime payment platforms
sikachu
1
130
Other Decks in Technology
See All in Technology
AIドリブンのソフトウェア開発 - うまいやり方とまずいやり方
okdt
PRO
9
630
ZOZOTOWNフロントエンドにおけるディレクトリの分割戦略
zozotech
PRO
18
5.4k
知られざるprops命名の慣習 アクション編
uhyo
11
2.6k
第4回 関東Kaggler会 [Training LLMs with Limited VRAM]
tascj
12
1.8k
広島銀行におけるAWS活用の取り組みについて
masakimori
0
140
コスト削減の基本の「キ」~ コスト消費3大リソースへの対策 ~
smt7174
2
170
Effective Match Types - Scala Days 2025
bishabosha
1
110
LLMエージェント時代に適応した開発フロー
hiragram
1
410
Amazon Bedrock AgentCore でプロモーション用動画生成エージェントを開発する
nasuvitz
6
430
Go で言うところのアレは TypeScript で言うとコレ / Kyoto.なんか #7
susisu
7
1.8k
RAID6 を楔形文字で組んで現代人を怖がらせましょう(実装編)
mimifuwa
1
310
AIエージェント就活入門 - MCPが履歴書になる未来
eltociear
0
530
Featured
See All Featured
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
31
2.2k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3.4k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
570
Thoughts on Productivity
jonyablonski
69
4.8k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
BBQ
matthewcrist
89
9.8k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
8
480
The Art of Programming - Codeland 2020
erikaheidi
55
13k
Making Projects Easy
brettharned
117
6.3k
A Modern Web Designer's Workflow
chriscoyier
695
190k
Why You Should Never Use an ORM
jnunemaker
PRO
59
9.5k
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