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
新しい SLO が良い感じにハマっている話
z63d
0
140
AIがコードを書く時代、人間は何を保証するのか———馬場さんと考える、開発者に求められる新しい責任と価値 - TECH PLAY
netmarkjp
0
330
AI研修(Day1)【MIXI 26新卒技術研修】
mixi_engineers
PRO
2
2.7k
AIで楽になるはずが、なぜ疲れる?
kinopeee
0
140
AIがAPIを書く時代に、私たちは何を設計すべきか
nagix
0
160
システム監視入門
grimoh
5
760
Escolhendo LLMs na Prática: Lições Reais em Busca Agêntica no Mercado Livre —TDC 2026 Floripa
jpbonson
0
110
大 AI 時代におけるC# の事情 ~ぶっちゃけトークを交えながら~
nenonaninu
1
550
AIエージェントの知識表現と推論に なぜグラフが使われるのか - 記号的AIの復権とニューラルAIとの統合
yohei1126
1
210
事業成長とAI活用を止めないデータ基盤アーキテクチャの設計思想
hiracky16
0
770
データエンジニアこそ組織のオントロジーに向き合うべき — 問いに答えるAIから、事業を動かすAIへ
gappy50
4
2.1k
現場で使える AWS DevOps Agent 活用ノウハウ - Release Management 機能の検証結果を添えて / AWS DevOps Agent Release Management and Know-How
kinunori
5
770
Featured
See All Featured
The SEO Collaboration Effect
kristinabergwall1
1
510
SEO for Brand Visibility & Recognition
aleyda
0
4.6k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
400
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
300
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
610
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
460
Faster Mobile Websites
deanohume
310
32k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
270
Exploring anti-patterns in Rails
aemeredith
3
450
Art, The Web, and Tiny UX
lynnandtonic
304
22k
Optimising Largest Contentful Paint
csswizardry
37
3.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