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
100
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
460
Zero-downtime payment platforms
sikachu
1
150
Other Decks in Technology
See All in Technology
生成AIで支える自動E2Eテストの継続運用
sansantech
PRO
0
100
Cursor Subagentsはいいぞ
yug1224
2
140
BFCacheを活用して無限スクロールのUX を改善した話
apple_yagi
0
140
Network Firewall Proxyで 自前プロキシを消し去ることができるのか
gusandayo
0
170
MCPで決済に楽にする
mu7889yoon
0
170
マルチモーダル非構造データとの闘い
shibuiwilliam
1
150
Move Fast and Break Things: 10 in 20
ramimac
0
120
「活動」は激変する。「ベース」は変わらない ~ 4つの軸で捉える_AI時代ソフトウェア開発マネジメント
sentokun
0
140
トイルを超えたCREは何屋になるのか
bengo4com
0
120
Blue/Green Deployment を用いた PostgreSQL のメジャーバージョンアップ
kkato1
1
240
Kubernetesの「隠れメモリ消費」によるNode共倒れと、Request適正化という処方箋
g0xu
0
170
40代からのアウトプット ― 経験は価値ある学びに変わる / 20260404 Naoki Takahashi
shift_evolve
PRO
5
770
Featured
See All Featured
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Utilizing Notion as your number one productivity tool
mfonobong
4
280
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
A Modern Web Designer's Workflow
chriscoyier
698
190k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
64
54k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.4k
The Curious Case for Waylosing
cassininazir
0
290
Un-Boring Meetings
codingconduct
0
250
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
90
A Tale of Four Properties
chriscoyier
163
24k
The Cost Of JavaScript in 2023
addyosmani
55
9.8k
Ethics towards AI in product and experience design
skipperchong
2
250
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