Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Testing Any Website Written in Any Language Wit...
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Prem Sichanugrist
November 16, 2014
Technology
240
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
150
What's coming in Rails 5.2, and sneak peek into Rails 6
sikachu
6
6.1k
Zero-downtime payment platforms
sikachu
2
330
Introduction to Active Support
sikachu
0
230
Hidden gems in Ruby on Rails
sikachu
5
330
Active Support Secrets
sikachu
1
320
Dependencies Testing With Appraisal And Bundler
sikachu
1
520
You have to test multiple versions of your gem's dependencies. You used Appraisal. It's super affective!
sikachu
0
500
Zero-downtime payment platforms
sikachu
1
190
Other Decks in Technology
See All in Technology
ビジネスを止めない技術的負債の返済のための戦略とその手法 - 技術的負債と向き合う / Complexity and Simplicity
soudai
PRO
3
700
Loop Engineering これくらいでいい
mikanichinose
0
220
[AWS 秋のクラウドオペレーション祭り 2026]AWS DevOps Agentで変わるリリースと運用対応 ~リリース管理機能と Directed actions のご紹介~
furuton
4
1.2k
使いこなすために知っておきたい Azure SRE Agent アンチパターン
torumakabe
2
480
生成AIと進める探索的データ分析(2026.10.03 第122回Tokyo.R勉強会)
tatamiya
2
1.5k
自分で立ててみるLLMサービス
y_sera15
0
160
FactoryBotアンチパターン / factory_bot anti-patterns
toshimaru
0
150
OpenSharing について熱く語る〜AI アセットの共有について〜
kameitomohiro
0
260
TinyGoでオブザーバビリティ?OpenTelemetryはTinyGoで使えるのか / Is OpenTelemetry available in TinyGo environment?
ymotongpoo
2
130
実践!Cloud Run ハンズオン!! / Cloud Run handson
y0hgi
0
210
今こそ知りたいAmplifyGen2
mkdev10
2
160
自主式軟體工廠
philipz
0
260
Featured
See All Featured
Designing for humans not robots
tammielis
254
26k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.4k
Mobile First: as difficult as doing things right
swwweet
225
10k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.8k
Heart Work Chapter 1 - Part 1
lfama
PRO
10
37k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.6k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Git: the NoSQL Database
bkeepers
PRO
433
67k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
What does AI have to do with Human Rights?
axbom
PRO
1
2.4k
What the history of the web can teach us about the future of AI
inesmontani
PRO
2
730
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