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
87
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
270
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
310
Zero-downtime payment platforms
sikachu
1
120
Other Decks in Technology
See All in Technology
令和最新版TypeScriptでのnpmパッケージ開発
lycorptech_jp
PRO
0
110
名刺メーカーDevグループ 紹介資料
sansan33
PRO
0
750
Introduction to Sansan, inc / Sansan Global Development Center, Inc.
sansan33
PRO
0
2.6k
AIの電力問題を概観する
rmaruy
1
220
Redmineの意外と知らない便利機能 (Redmine 6.0対応版)
vividtone
0
1.3k
All About Sansan – for New Global Engineers
sansan33
PRO
1
1.2k
コードの考古学 〜労務システムから発掘した成長の糧〜
kenta_smarthr
1
1.3k
S3 Tables を図解でやさしくおさらい~基本から QuickSight 連携まで/s3-tables-illustrated-basics-quicksight
emiki
2
350
SmartHRの複数のチームにおけるMCPサーバーの活用事例と課題
yukisnow1823
2
1.2k
やさしいClaude Code入門
minorun365
PRO
36
27k
JNation 2025 - Quarkus for Spring Developers
edeandrea
PRO
0
110
継続戦闘能⼒
sansantech
PRO
0
220
Featured
See All Featured
GitHub's CSS Performance
jonrohan
1031
460k
Fontdeck: Realign not Redesign
paulrobertlloyd
84
5.5k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
8
750
A Tale of Four Properties
chriscoyier
159
23k
The Invisible Side of Design
smashingmag
299
50k
Into the Great Unknown - MozCon
thekraken
39
1.8k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
32
5.8k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
6
660
BBQ
matthewcrist
88
9.7k
Become a Pro
speakerdeck
PRO
28
5.4k
Rebuilding a faster, lazier Slack
samanthasiow
81
9k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
12k
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