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
6k
Zero-downtime payment platforms
sikachu
2
250
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
320
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
Winning at PHP in Production in 2025
beberlei
1
270
Azure & DevSecOps
kkamegawa
2
170
MySQL InnoDB Data Recovery - The Last Resort
lefred
0
110
AOAI で AI アプリを開発する時にまず考えたいこと
mappie_kochi
1
520
続・やっぱり余白が大切だった話
kakehashi
PRO
2
280
30代からでも遅くない! 内製開発の世界に飛び込み、最前線で戦うLLMアプリ開発エンジニアになろう
minorun365
PRO
16
5.1k
Новые мапы в Go. Вова Марунин, Clatch, МТС
lamodatech
0
1.9k
Databricksで完全履修!オールインワンレイクハウスは実在した!
akuwano
0
150
白金鉱業Meetup_Vol.18_AIエージェント時代のUI/UX設計
brainpadpr
1
290
Azure Maps Visual in PowerBIで分析しよう
nakasho
0
210
GraphQLを活用したリアーキテクチャに対応するSLI/Oの再設計
coconala_engineer
0
200
LINE 購物幕後推手
line_developers_tw
PRO
0
420
Featured
See All Featured
Facilitating Awesome Meetings
lara
54
6.3k
Why Our Code Smells
bkeepers
PRO
336
57k
Stop Working from a Prison Cell
hatefulcrawdad
268
20k
GraphQLとの向き合い方2022年版
quramy
46
14k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
How to Ace a Technical Interview
jacobian
276
23k
Bash Introduction
62gerente
612
210k
A Tale of Four Properties
chriscoyier
159
23k
Done Done
chrislema
184
16k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
179
53k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
Rails Girls Zürich Keynote
gr2m
94
13k
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