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
180
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
96
What's coming in Rails 5.2, and sneak peek into Rails 6
sikachu
6
6k
Zero-downtime payment platforms
sikachu
2
270
Introduction to Active Support
sikachu
0
180
Hidden gems in Ruby on Rails
sikachu
5
290
Active Support Secrets
sikachu
1
270
Dependencies Testing With Appraisal And Bundler
sikachu
1
360
You have to test multiple versions of your gem's dependencies. You used Appraisal. It's super affective!
sikachu
0
350
Zero-downtime payment platforms
sikachu
1
130
Other Decks in Technology
See All in Technology
データエンジニアがこの先生きのこるには...?
10xinc
0
450
AIが書いたコードをAIが検証する!自律的なモバイルアプリ開発の実現
henteko
1
350
Goに育てられ開発者向けセキュリティ事業を立ち上げた僕が今向き合う、AI × セキュリティの最前線 / Go Conference 2025
flatt_security
0
350
How to achieve interoperable digital identity across Asian countries
fujie
0
120
「Verify with Wallet API」を アプリに導入するために
hinakko
1
250
空間を設計する力を考える / 20251004 Naoki Takahashi
shift_evolve
PRO
3
400
E2Eテスト設計_自動化のリアル___Playwrightでの実践とMCPの試み__AIによるテスト観点作成_.pdf
findy_eventslides
1
490
ユニットテストに対する考え方の変遷 / Everyone should watch his live coding
mdstoy
0
130
【Oracle Cloud ウェビナー】クラウド導入に「専用クラウド」という選択肢、Oracle AlloyとOCI Dedicated Region とは
oracle4engineer
PRO
3
120
Azure Well-Architected Framework入門
tomokusaba
1
330
Goにおける 生成AIによるコード生成の ベンチマーク評価入門
daisuketakeda
2
110
多様な事業ドメインのクリエイターへ 価値を届けるための営みについて
massyuu
1
390
Featured
See All Featured
Speed Design
sergeychernyshev
32
1.1k
GitHub's CSS Performance
jonrohan
1032
460k
Building a Modern Day E-commerce SEO Strategy
aleyda
43
7.7k
jQuery: Nuts, Bolts and Bling
dougneiner
64
7.9k
The Invisible Side of Design
smashingmag
301
51k
Context Engineering - Making Every Token Count
addyosmani
5
200
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.2k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
7
890
Building Flexible Design Systems
yeseniaperezcruz
329
39k
A Tale of Four Properties
chriscoyier
160
23k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
[RailsConf 2023] Rails as a piece of cake
palkan
57
5.9k
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