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
290
Introduction to Active Support
sikachu
0
200
Hidden gems in Ruby on Rails
sikachu
5
310
Active Support Secrets
sikachu
1
300
Dependencies Testing With Appraisal And Bundler
sikachu
1
490
You have to test multiple versions of your gem's dependencies. You used Appraisal. It's super affective!
sikachu
0
460
Zero-downtime payment platforms
sikachu
1
150
Other Decks in Technology
See All in Technology
Zero Data Loss Autonomous Recovery Service サービス概要
oracle4engineer
PRO
3
13k
事例から紐解くSHIFT流QA支援 ~大規模プロジェクトの品質管理支援、QA組織立ち上げ~ / 20260320 Nozomu Koketsu
shift_evolve
PRO
0
130
Visional 28新卒プロダクト職(エンジニア/デザイナー)向け 会社説明資料 / Visional Company Briefing for Newgrads 28
visional_engineering_and_design
1
130
AlloyDB 奮闘記
hatappi
0
200
TypeScript 7.0の現在地と備え方
uhyo
7
2k
ソフトバンク流!プラットフォームエンジニアリング実現へのアプローチ
sbtechnight
1
250
AI時代のオンプレ-クラウドキャリアチェンジ考
yuu0w0yuu
0
210
Phase07_実務適用
overflowinc
0
1.5k
君はジョシュアツリーを知っているか?名前をつけて事象を正しく認識しよう / Do you know Joshua Tree?
ykanoh
2
110
20260320_JaSST26_Tokyo_登壇資料.pdf
mura_shin
0
110
Phase11_戦略的AI経営
overflowinc
0
1.3k
Bill One 開発エンジニア 紹介資料
sansan33
PRO
5
18k
Featured
See All Featured
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
340
Being A Developer After 40
akosma
91
590k
A designer walks into a library…
pauljervisheath
210
24k
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.9k
Design in an AI World
tapps
0
180
Odyssey Design
rkendrick25
PRO
2
550
[SF Ruby Conf 2025] Rails X
palkan
2
850
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
92
Docker and Python
trallard
47
3.8k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
230
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.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