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
220
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
130
What's coming in Rails 5.2, and sneak peek into Rails 6
sikachu
6
6k
Zero-downtime payment platforms
sikachu
2
320
Introduction to Active Support
sikachu
0
220
Hidden gems in Ruby on Rails
sikachu
5
320
Active Support Secrets
sikachu
1
310
Dependencies Testing With Appraisal And Bundler
sikachu
1
510
You have to test multiple versions of your gem's dependencies. You used Appraisal. It's super affective!
sikachu
0
480
Zero-downtime payment platforms
sikachu
1
180
Other Decks in Technology
See All in Technology
Webの技術とガジェットで子どもも大人も楽しめるワクワク体験を提供する / Qiita Tech Festa Day 2026
you
PRO
1
310
PLaMoを毎日の開発で使い育てていく
pfn
PRO
0
110
全社でのソフトウェアサプライチェーン攻撃対策をやってみた with Takumi Guard
z63d
0
330
Amazon Bedrock Managed Knowledge BaseDive Deep
ren8k
0
250
CTOキーノート:AI時代の「つなぐ」を再定義 ― 真のIoTとリアルワールドAI【SORACOM Discovery 2026】
soracom
PRO
0
320
信頼できるテスティングAIをどう育てるか?
odan611
0
160
Claude Code並行開発環境の ムダ‧ムラ‧ムリを見直した話
muranakaaa
0
310
カメラ×AIで挑む「ホワイト物流」― 車両管理、自動化の壁と突破口【SORACOM Discovery 2026】
soracom
PRO
0
180
コンポーネント名には何を含めるべきなのか? / what-should-be-included-in-component-names
airrnot1106
0
180
DevOps Agentで運用判断をチーム資産にする~Agent InstructionsとAgent Skillを継続的に育てる~
fujioka6789
0
170
QAタスクをスキル化したいときに考えること
aomoriringo
0
130
新しい SLO が良い感じにハマっている話
z63d
0
140
Featured
See All Featured
AI: The stuff that nobody shows you
jnunemaker
PRO
9
850
The Mindset for Success: Future Career Progression
greggifford
PRO
0
430
Skip the Path - Find Your Career Trail
mkilby
1
170
We Have a Design System, Now What?
morganepeng
55
8.2k
Abbi's Birthday
coloredviolet
3
8.9k
Un-Boring Meetings
codingconduct
0
350
WENDY [Excerpt]
tessaabrams
11
39k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
240
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
400
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
1
380
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.9k
Optimizing for Happiness
mojombo
378
71k
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