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
460
Zero-downtime payment platforms
sikachu
1
150
Other Decks in Technology
See All in Technology
Introduction to Sansan for Engineers / エンジニア向け会社紹介
sansan33
PRO
6
74k
さくらのクラウドでつくるCloudNative Daysのオブザーバビリティ基盤
b1gb4by
0
150
解剖"React Native"
hacusk
0
120
3つのボトルネックを解消し、リリースエンジニアリングを再定義した話
nealle
0
370
【PHPカンファレンス小田原2026】Webアプリケーションエンジニアにも知ってほしい オブザーバビリティ の本質
fendo181
0
560
Introduction to Bill One Development Engineer
sansan33
PRO
0
400
チームで育てるAI自走環境_20260409
fuktig
0
1k
Master Dataグループ紹介資料
sansan33
PRO
1
4.6k
数案件を同時に進行するためのコンテキスト整理術
sutetotanuki
1
180
BIツール「Omni」の紹介 @Snowflake中部UG
sagara
0
260
Digitization部 紹介資料
sansan33
PRO
1
7.2k
NOSTR, réseau social et espace de liberté décentralisé
rlifchitz
0
150
Featured
See All Featured
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.7k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
450
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
64
54k
The Spectacular Lies of Maps
axbom
PRO
1
680
The browser strikes back
jonoalderson
0
930
Un-Boring Meetings
codingconduct
0
260
Crafting Experiences
bethany
1
110
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
The Cult of Friendly URLs
andyhume
79
6.8k
Building Applications with DynamoDB
mza
96
7k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
Facilitating Awesome Meetings
lara
57
6.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