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
さくらの夕べ Debianナイト - さくらのVPS編
dictoss
0
180
От ручной разметки к LLM: как мы создавали облако тегов в Lamoda. Анастасия Ангелова, Data Scientist, Lamoda Tech
lamodatech
0
440
Classmethod AI Talks(CATs) #21 司会進行スライド(2025.04.17) / classmethod-ai-talks-aka-cats_moderator-slides_vol21_2025-04-17
shinyaa31
0
460
いつも初心者向けの記事に助けられているので得意分野では初心者向けの記事を書きます
toru_kubota
2
270
Micro Frontends: Necessity, Implementation, and Challenges
rainerhahnekamp
2
360
Amebaにおける Platform Engineeringの実践
kumorn5s
6
900
YOLOv10~v12
tenten0727
3
870
技術者はかっこいいものだ!!~キルラキルから学んだエンジニアの生き方~
masakiokuda
2
160
TopAppBar Composableをカスタムする
hunachi
0
180
LangChainとLangGiraphによるRAG・AIエージェント実践入門「10章 要件定義書生成Alエージェントの開発」輪読会スライド
takaakiinada
0
130
Amazon CloudWatch Application Signals ではじめるバーンレートアラーム / Burn rate alarm with Amazon CloudWatch Application Signals
ymotongpoo
5
320
All You Need Is Kusa 〜Slackデータで始めるデータドリブン〜
jonnojun
0
140
Featured
See All Featured
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
How to Think Like a Performance Engineer
csswizardry
23
1.5k
Building Adaptive Systems
keathley
41
2.5k
The Cult of Friendly URLs
andyhume
78
6.3k
Large-scale JavaScript Application Architecture
addyosmani
512
110k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Code Reviewing Like a Champion
maltzj
522
39k
Optimising Largest Contentful Paint
csswizardry
36
3.2k
The Art of Programming - Codeland 2020
erikaheidi
53
13k
Code Review Best Practice
trishagee
67
18k
Visualization
eitanlees
146
16k
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