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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Prem Sichanugrist
November 16, 2014
Technology
210
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
120
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
220
Hidden gems in Ruby on Rails
sikachu
5
310
Active Support Secrets
sikachu
1
310
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
170
Other Decks in Technology
See All in Technology
「コーディング」しない人のための Claude Code 入門 ChatGPT の次の一歩 — 業務に組み込む 育成・共有・自動化
rfdnxbro
2
1.2k
Terraformモジュールは、なぜ「魔境」化するのか
hayama17
1
210
Claude Code×Terraform IaC テンプレート駆動開発
itouhi
1
400
AIプラットフォームを運用し続けるための可観測性
tanimuyk
4
1.1k
関西に縁あるMicrosoft MVPsが語るCopilotの未来
kasada
0
1.2k
「嘘をつくテスト」の失敗例から学ぶ 良いテストコード #frontend_phpcon_do
asumikam
0
520
地元にいないローカルオーガナイザーの立ち回り
uvb_76
1
940
先取りMaven4 ~16年ぶりのメジャーアップデート、その進化とは?~
ogiwarat
0
150
2026.06.13_AI時代に事業会社が「SIer出身エンジニア」を求める理由 / Why Businesses Seek Engineers with a System Integrator Background in the AI Era
jumtech
0
580
AI Adaptable なテストを整える工夫 / Ways to Make Your Tests AI-Adaptable
bitkey
PRO
3
220
BigQuery の Cross-cloud Lakehouse への歩み
phaya72
2
590
Claude code Orchestra
ozakiomumkj
3
980
Featured
See All Featured
Paper Plane (Part 1)
katiecoart
PRO
0
8.5k
Building Applications with DynamoDB
mza
96
7.1k
The SEO identity crisis: Don't let AI make you average
varn
0
480
Optimising Largest Contentful Paint
csswizardry
37
3.7k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
240
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
260
Practical Orchestrator
shlominoach
191
11k
It's Worth the Effort
3n
188
29k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
380
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
150
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.7k
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