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
200
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
100
What's coming in Rails 5.2, and sneak peek into Rails 6
sikachu
6
6k
Zero-downtime payment platforms
sikachu
2
280
Introduction to Active Support
sikachu
0
200
Hidden gems in Ruby on Rails
sikachu
5
300
Active Support Secrets
sikachu
1
290
Dependencies Testing With Appraisal And Bundler
sikachu
1
480
You have to test multiple versions of your gem's dependencies. You used Appraisal. It's super affective!
sikachu
0
450
Zero-downtime payment platforms
sikachu
1
150
Other Decks in Technology
See All in Technology
AI駆動開発を事業のコアに置く
tasukuonizawa
1
340
Red Hat OpenStack Services on OpenShift
tamemiya
0
130
SREのプラクティスを用いた3領域同時 マネジメントへの挑戦 〜SRE・情シス・セキュリティを統合した チーム運営術〜
coconala_engineer
2
740
M&A 後の統合をどう進めるか ─ ナレッジワーク × Poetics が実践した組織とシステムの融合
kworkdev
PRO
1
490
マーケットプレイス版Oracle WebCenter Content For OCI
oracle4engineer
PRO
5
1.6k
Embedded SREの終わりを設計する 「なんとなく」から計画的な自立支援へ
sansantech
PRO
3
2.6k
Greatest Disaster Hits in Web Performance
guaca
0
280
コスト削減から「セキュリティと利便性」を担うプラットフォームへ
sansantech
PRO
3
1.6k
ランサムウェア対策としてのpnpm導入のススメ
ishikawa_satoru
0
220
Amazon Bedrock Knowledge Basesチャンキング解説!
aoinoguchi
0
160
今日から始めるAmazon Bedrock AgentCore
har1101
4
420
Cosmos World Foundation Model Platform for Physical AI
takmin
0
960
Featured
See All Featured
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
71
A Tale of Four Properties
chriscoyier
162
24k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.4k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
330
Ruling the World: When Life Gets Gamed
codingconduct
0
150
It's Worth the Effort
3n
188
29k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
150
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
1.8k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
190
Deep Space Network (abreviated)
tonyrice
0
64
Fireside Chat
paigeccino
41
3.8k
Site-Speed That Sticks
csswizardry
13
1.1k
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