Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Testing Any Website Written in Any Language Wit...
Search
Prem Sichanugrist
November 16, 2014
Technology
230
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
140
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
230
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
490
Zero-downtime payment platforms
sikachu
1
180
Other Decks in Technology
See All in Technology
CLIライブラリ開発を支える技術
htnabe
0
120
Spring BootからQuarkusへの移行
tatsuya1bm
2
120
AIによるクリエイティブ生成を行う上での試行錯誤
plaidtech
PRO
0
150
今話題のAI「Jev」って何? 宇宙最速で学ぶ会
minorun365
PRO
25
14k
AI時代、データエンジニアが一番おもろい
genshun9
0
620
アプリログインとWeb認証基盤をつなぐ ASWebAuthenticationSession 作法
shimastripe
1
320
すぐできる衛星通信対応 あとは山奥に行くだけ
tatetate55
0
130
LTのテーマ どうきめてる?〜5つの型と私のやり方〜
yama3133
1
110
GoにおけるFFIのこれまでとこれから
goccy
5
3.6k
Railsのように考える: See through the Master
snoozer05
PRO
3
900
Reactの設計論
uhyo
24
13k
登壇の自信を奪う3匹のオバケ / 3 Ghosts That Rob You of Your Confidence in Public Speaking
pauli
9
960
Featured
See All Featured
Claude Code のすすめ
schroneko
67
230k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
410
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.5k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
350
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
320
The untapped power of vector embeddings
frankvandijk
2
1.9k
What does AI have to do with Human Rights?
axbom
PRO
1
2.4k
How to Ace a Technical Interview
jacobian
281
24k
How to make the Groovebox
asonas
2
2.4k
BBQ
matthewcrist
89
10k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
368
27k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
830
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