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
210
1
Share
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
110
What's coming in Rails 5.2, and sneak peek into Rails 6
sikachu
6
6k
Zero-downtime payment platforms
sikachu
2
300
Introduction to Active Support
sikachu
0
210
Hidden gems in Ruby on Rails
sikachu
5
310
Active Support Secrets
sikachu
1
300
Dependencies Testing With Appraisal And Bundler
sikachu
1
500
You have to test multiple versions of your gem's dependencies. You used Appraisal. It's super affective!
sikachu
0
470
Zero-downtime payment platforms
sikachu
1
160
Other Decks in Technology
See All in Technology
How to learn AWS Well-Architected with AWS BuilderCards: Security Edition
coosuke
PRO
0
200
TypeScript の型で副作用の実行順序を制御する
yanaemon
1
130
DI コンテナ自動生成ツールを実装してみた / intro-autodi
uhzz
0
770
ルール・ロール・ツールを創る / Creating Rules, Roles and Tools
ks91
PRO
0
140
freee-mcpを Local→Remote で出してわかった MCP認可実装のリアル
terara
2
220
GitHub Copilot appで変わる GitHub Copilot CLI開発体験
tomokusaba
0
110
業務に残された「良くない型」で考える「TypeScriptの難しさ」
sajikix
3
980
RubyでRuby拡張を書いたらRubyより35倍速になったってどういうこと??
kazuho
1
130
Redmine次期バージョン7.0の注目新機能解説 — UI/UX強化と連携強化を中心に
vividtone
1
220
ECSのTerraformモジュールにコントリビュートした話
harukasakihara
0
270
JTCでRedmine利用者2700人を実現した手法 第二部
nobuonakamura
0
150
Directions Asia 2026 | Beyond Buildable AI Agents: Let’s Visualize Partner Value in the AI Era
ryoheig0405
0
130
Featured
See All Featured
Exploring anti-patterns in Rails
aemeredith
3
360
Fireside Chat
paigeccino
42
3.9k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.5k
KATA
mclloyd
PRO
35
15k
Git: the NoSQL Database
bkeepers
PRO
432
67k
ラッコキーワード サービス紹介資料
rakko
1
3.3M
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
120
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
390
Leo the Paperboy
mayatellez
7
1.8k
The agentic SEO stack - context over prompts
schlessera
0
780
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.5k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.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