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
200
1
Share
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
110
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
210
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
470
Zero-downtime payment platforms
sikachu
1
160
Other Decks in Technology
See All in Technology
最初の一歩を踏み出せなかった私が、誰かの背中を押したいと思うようになるまで / give someone a push
mii3king
0
160
AgentCore×VPCでの設計パターンn選と勘所
har1101
3
290
EBS暗号化に失敗してEC2が動かなくなった話
hamaguchimmm
2
210
運用システムにおけるデータ活用とPlatform
sansantech
PRO
0
120
Hacobu Tech Deck
hacobu
PRO
0
120
[最強DB講義]推薦システム | 基礎編
recsyslab
PRO
1
180
社内エンジニア勉強会の醍醐味と苦しみ/tamadev
nishiuma
0
230
プラットフォームエンジニアリングの実践 - AWS コンテナサービスで構築する社内プラットフォーム / AWS Containers Platform Meetup #1
literalice
1
210
今年注目する!データ分析プラットフォームでのAIの活用
nayuts
0
140
「誰一人取り残されない」 AIエージェント時代のプロダクト設計思想 Product Management Summit 2026
mizushimac
1
650
コードや知識を組み込む / Incorporate Code and Knowledge
ks91
PRO
0
160
サイボウズ 開発本部採用ピッチ / Cybozu Engineer Recruit
cybozuinsideout
PRO
10
78k
Featured
See All Featured
Navigating Team Friction
lara
192
16k
Ruling the World: When Life Gets Gamed
codingconduct
0
210
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
270
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.9k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
240
Leo the Paperboy
mayatellez
7
1.7k
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
680
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
61
43k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.7k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
1.9k
Design in an AI World
tapps
1
200
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
380
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