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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
280
Introduction to Active Support
sikachu
0
200
Hidden gems in Ruby on Rails
sikachu
5
300
Active Support Secrets
sikachu
1
290
Dependencies Testing With Appraisal And Bundler
sikachu
1
480
You have to test multiple versions of your gem's dependencies. You used Appraisal. It's super affective!
sikachu
0
450
Zero-downtime payment platforms
sikachu
1
150
Other Decks in Technology
See All in Technology
顧客の言葉を、そのまま信じない勇気
yamatai1212
1
360
外部キー制約の知っておいて欲しいこと - RDBMSを正しく使うために必要なこと / FOREIGN KEY Night
soudai
PRO
12
5.6k
CDKで始めるTypeScript開発のススメ
tsukuboshi
1
520
茨城の思い出を振り返る ~CDKのセキュリティを添えて~ / 20260201 Mitsutoshi Matsuo
shift_evolve
PRO
1
370
30万人の同時アクセスに耐えたい!新サービスの盤石なリリースを支える負荷試験 / SRE Kaigi 2026
genda
4
1.3k
[CV勉強会@関東 World Model 読み会] Orbis: Overcoming Challenges of Long-Horizon Prediction in Driving World Models (Mousakhan+, NeurIPS 2025)
abemii
0
150
ClickHouseはどのように大規模データを活用したAIエージェントを全社展開しているのか
mikimatsumoto
0
270
We Built for Predictability; The Workloads Didn’t Care
stahnma
0
150
制約が導く迷わない設計 〜 信頼性と運用性を両立するマイナンバー管理システムの実践 〜
bwkw
3
1k
予期せぬコストの急増を障害のように扱う――「コスト版ポストモーテム」の導入とその後の改善
muziyoshiz
1
2k
AIエージェントを開発しよう!-AgentCore活用の勘所-
yukiogawa
0
180
仕様書駆動AI開発の実践: Issue→Skill→PRテンプレで 再現性を作る
knishioka
2
680
Featured
See All Featured
30 Presentation Tips
portentint
PRO
1
220
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
750
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.2k
Mind Mapping
helmedeiros
PRO
0
90
Ethics towards AI in product and experience design
skipperchong
2
200
Building the Perfect Custom Keyboard
takai
2
690
How to Think Like a Performance Engineer
csswizardry
28
2.5k
Scaling GitHub
holman
464
140k
Code Review Best Practice
trishagee
74
20k
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
430
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
410
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