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
210
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
120
What's coming in Rails 5.2, and sneak peek into Rails 6
sikachu
6
6k
Zero-downtime payment platforms
sikachu
2
300
Introduction to Active Support
sikachu
0
220
Hidden gems in Ruby on Rails
sikachu
5
310
Active Support Secrets
sikachu
1
310
Dependencies Testing With Appraisal And Bundler
sikachu
1
500
You have to test multiple versions of your gem's dependencies. You used Appraisal. It's super affective!
sikachu
0
470
Zero-downtime payment platforms
sikachu
1
170
Other Decks in Technology
See All in Technology
2026 TECHFRESH 畢業分享會 - 開發日常大解密!從領域驅動到企業級上線
line_developers_tw
PRO
0
790
FinOps × AIエージェントで実現する コストインシデントの自動調査
oasis1994liveforever
0
120
自宅LLMの話
jacopen
1
220
DevOps Agentで始めるAWS運用 〜フロンティアエージェントが変える運用の現場〜
nyankotaro
1
380
Oracle AI Database@Google Cloud:サービス概要のご紹介
oracle4engineer
PRO
6
1.5k
2026TECHFRESH畢業分享會 - 原生還是跨平台? App 開發踩坑實錄
line_developers_tw
PRO
0
810
How Timee Delivers Day 1 Production Ready LLM Features
tomoyks
0
130
Dario Amodi『Policy on the AI Exponential』を理解する
nagatsu
0
220
連合学習と機密コンピューティング
lycorptech_jp
PRO
0
100
ポケモンの型をTypeScriptの型システムで表現してみた
subroh0508
0
370
社内 AI エージェント Synapse と セマンティックレイヤーの育て方
hiroakis
2
1.7k
2026TECHFRESH畢業分享會 - Lightning Talk - E起 See See : 電商推薦讀心術? 數據說了算
line_developers_tw
PRO
0
790
Featured
See All Featured
Marketing to machines
jonoalderson
1
5.4k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.5k
The Curse of the Amulet
leimatthew05
1
13k
What does AI have to do with Human Rights?
axbom
PRO
1
2.2k
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.7k
Visualization
eitanlees
152
17k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
830
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.1k
4 Signs Your Business is Dying
shpigford
187
22k
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.3k
Producing Creativity
orderedlist
PRO
348
40k
Context Engineering - Making Every Token Count
addyosmani
9
960
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