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
96
What's coming in Rails 5.2, and sneak peek into Rails 6
sikachu
6
6k
Zero-downtime payment platforms
sikachu
2
270
Introduction to Active Support
sikachu
0
180
Hidden gems in Ruby on Rails
sikachu
5
290
Active Support Secrets
sikachu
1
270
Dependencies Testing With Appraisal And Bundler
sikachu
1
360
You have to test multiple versions of your gem's dependencies. You used Appraisal. It's super affective!
sikachu
0
350
Zero-downtime payment platforms
sikachu
1
130
Other Decks in Technology
See All in Technology
AI駆動開発を推進するためにサービス開発チームで 取り組んでいること
noayaoshiro
0
220
多野優介
tanoyusuke
1
460
Goにおける 生成AIによるコード生成の ベンチマーク評価入門
daisuketakeda
2
110
Where will it converge?
ibknadedeji
0
190
OCI Network Firewall 概要
oracle4engineer
PRO
1
7.8k
Flaky Testへの現実解をGoのプロポーザルから考える | Go Conference 2025
upamune
1
440
BtoBプロダクト開発の深層
16bitidol
0
370
Oracle Cloud Infrastructure:2025年9月度サービス・アップデート
oracle4engineer
PRO
0
470
AIが書いたコードをAIが検証する!自律的なモバイルアプリ開発の実現
henteko
1
350
神回のメカニズムと再現方法/Mechanisms and Playbook for Kamikai scrumat2025
moriyuya
4
590
いまさら聞けない ABテスト入門
skmr2348
1
210
Adminaで実現するISMS/SOC2運用の効率化 〜 アカウント管理編 〜
shonansurvivors
2
280
Featured
See All Featured
Being A Developer After 40
akosma
91
590k
Scaling GitHub
holman
463
140k
Balancing Empowerment & Direction
lara
4
680
Build The Right Thing And Hit Your Dates
maggiecrowley
37
2.9k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.1k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
15k
What’s in a name? Adding method to the madness
productmarketing
PRO
23
3.7k
The World Runs on Bad Software
bkeepers
PRO
71
11k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
15
1.7k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4k
KATA
mclloyd
32
15k
The Straight Up "How To Draw Better" Workshop
denniskardys
237
140k
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