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
170
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
88
What's coming in Rails 5.2, and sneak peek into Rails 6
sikachu
6
6k
Zero-downtime payment platforms
sikachu
2
250
Introduction to Active Support
sikachu
0
170
Hidden gems in Ruby on Rails
sikachu
5
280
Active Support Secrets
sikachu
1
260
Dependencies Testing With Appraisal And Bundler
sikachu
1
330
You have to test multiple versions of your gem's dependencies. You used Appraisal. It's super affective!
sikachu
0
320
Zero-downtime payment platforms
sikachu
1
120
Other Decks in Technology
See All in Technology
QAはソフトウェアエンジニアリングを学んで実践するのが大事なの
ymty
1
220
Introduction to Sansan Meishi Maker Development Engineer
sansan33
PRO
0
270
Classmethod AI Talks(CATs) #22 司会進行スライド(2025.06.12) / classmethod-ai-talks-aka-cats_moderator-slides_vol22_2025-06-12
shinyaa31
0
110
AIコーディング新時代を生き残るための試行錯誤 / AI Coding Survival Guide
tomohisa
8
11k
CSSの最新トレンド Ver.2025
tonkotsuboy_com
11
4.4k
開発効率と信頼性を両立する Ubieのプラットフォームエンジニアリング
teru0x1
0
130
從開發到架構設計的可觀測性實踐
philipz
0
220
Sansan Engineering Unit 紹介資料
sansan33
PRO
1
2k
Long journey of Continuous Delivery at Mercari
hisaharu
1
190
プロジェクトマネージャーに最後まで残るたった一つの仕事は交渉
ichimichi
1
200
本部長の代わりに提案書レビュー! KDDI営業が毎日使うAIエージェント「A-BOSS」開発秘話
minorun365
PRO
4
450
AI Engineering Summit Pre Event LT #10
okaru
2
540
Featured
See All Featured
Visualization
eitanlees
146
16k
RailsConf 2023
tenderlove
30
1.1k
Art, The Web, and Tiny UX
lynnandtonic
299
21k
The Cost Of JavaScript in 2023
addyosmani
50
8.3k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
10
880
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Building a Modern Day E-commerce SEO Strategy
aleyda
41
7.3k
StorybookのUI Testing Handbookを読んだ
zakiyama
30
5.8k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
357
30k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
106
19k
How to train your dragon (web standard)
notwaldorf
92
6.1k
For a Future-Friendly Web
brad_frost
179
9.8k
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