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
160
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
5.9k
Zero-downtime payment platforms
sikachu
2
240
Introduction to Active Support
sikachu
0
160
Hidden gems in Ruby on Rails
sikachu
5
270
Active Support Secrets
sikachu
1
250
Dependencies Testing With Appraisal And Bundler
sikachu
1
300
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
4/16/25 - SFJug - Java meets AI: Build LLM-Powered Apps with LangChain4j
edeandrea
PRO
2
120
JPOUG Tech Talk #12 UNDO Tablespace Reintroduction
nori_shinoda
2
150
DuckDB MCPサーバーを使ってAWSコストを分析させてみた / AWS cost analysis with DuckDB MCP server
masahirokawahara
0
1.3k
AIエージェント開発手法と業務導入のプラクティス
ykosaka
4
1.5k
サーバレス、コンテナ、データベース特化型機能をご紹介。CloudWatch をもっと使いこなそう!
o11yfes2023
0
180
プロダクト開発におけるAI時代の開発生産性
shnjtk
2
240
品質文化を支える小さいクロスファンクショナルなチーム / Cross-functional teams fostering quality culture
toma_sm
0
120
ガバクラのAWS長期継続割引 ~次の4/1に慌てないために~
hamijay_cloud
1
270
ElixirがHW化され、最新CPU/GPU/NWを過去のものとする数万倍、高速+超省電力化されたWeb/動画配信/AIが動く日
piacerex
0
150
C++26アップデート 2025-03
faithandbrave
0
670
SmartHR プロダクトエンジニア求人ガイド_2025 / PdE job guide 2025
smarthr
0
130
Стильный код: натуральный поиск редких атрибутов по картинке. Юлия Антохина, Data Scientist, Lamoda Tech
lamodatech
0
750
Featured
See All Featured
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
41
2.2k
Documentation Writing (for coders)
carmenintech
69
4.7k
[RailsConf 2023] Rails as a piece of cake
palkan
54
5.4k
We Have a Design System, Now What?
morganepeng
52
7.5k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
How to train your dragon (web standard)
notwaldorf
90
6k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
52
2.4k
Embracing the Ebb and Flow
colly
85
4.6k
Stop Working from a Prison Cell
hatefulcrawdad
268
20k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
47
2.7k
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