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 With Capybara and RSpec
Search
Prem Sichanugrist
November 16, 2014
Technology
1
150
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
66
What's coming in Rails 5.2, and sneak peek into Rails 6
sikachu
6
5.9k
Zero-downtime payment platforms
sikachu
2
230
Introduction to Active Support
sikachu
0
140
Hidden gems in Ruby on Rails
sikachu
5
250
Active Support Secrets
sikachu
1
240
Dependencies Testing With Appraisal And Bundler
sikachu
1
190
You have to test multiple versions of your gem's dependencies. You used Appraisal. It's super affective!
sikachu
0
240
Zero-downtime payment platforms
sikachu
1
120
Other Decks in Technology
See All in Technology
AWS IAMのアンチパターン/AWSが考える最低権限実現へのアプローチ概略(JAWS-UG朝会#59資料改修20分版)
htan
0
330
Azure AI ことはじめ
tsubakimoto_s
0
130
CTOから見た事業開発とプロダクト開発 / My Perspective on Business and Product Development as CTO
keisuke69
4
960
Git 研修 Basic【MIXI 24新卒技術研修】
mixi_engineers
PRO
0
310
What if...? 처음부터 다시 LLM 어플리케이션을 개발한다면
huffon
0
1k
ここがすごいよ! AWS Systems Manager!
saichan11
0
1.8k
コミュニティサービスに「あなたへ」フィードを リリースするまでの試行錯誤
takapy
1
150
AIアシスタントの活用で品質の向上と開発ワークフローのスピードアップ
nagix
1
210
E2Eテスト自動化プラットフォームにおけるAIの活用
shift_evolve
0
190
コンテナ・K8s研修 - 後半 Kubernetes 基礎&ハンズオン【MIXI 24新卒技術研修】
mixi_engineers
PRO
1
120
スレットハンティングについて知っておきたいこと
hacket
0
130
フルリモートワークはエンジニアの夢を叶えたか? #cm_odyssey
mamohacy
2
600
Featured
See All Featured
Embracing the Ebb and Flow
colly
81
4.3k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
90
47k
Into the Great Unknown - MozCon
thekraken
20
1.3k
In The Pink: A Labor of Love
frogandcode
139
22k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
16
1.6k
The Cult of Friendly URLs
andyhume
75
5.9k
It's Worth the Effort
3n
181
27k
Why Our Code Smells
bkeepers
PRO
332
56k
Fashionably flexible responsive web design (full day workshop)
malarkey
399
65k
Unsuck your backbone
ammeep
666
57k
Building Your Own Lightsaber
phodgson
101
5.9k
Done Done
chrislema
179
15k
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