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
220
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
130
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
480
Zero-downtime payment platforms
sikachu
1
180
Other Decks in Technology
See All in Technology
自宅NWにISR4331を導入してみた話
okaits
0
110
ホームラボ紹介
y_sera15
0
210
My broken English still works: speaking at global OSS events
naruoga
0
120
2027年のMetricKit
kantacky
0
120
平文パスワードはログに“残り” ── 肝心の侵入は“痕跡すら残らない”
kuroneko13
0
100
関東Kaggler会発表資料
takoi
1
260
SO-101×VLAによる3色キューブのピック&プレース
abeja
0
220
Digitization部 紹介資料
sansan33
PRO
2
7.7k
案件に一番詳しいAIを Amazon Bedrock AgentCore で作る ― 知見が知見を生むチームへ / Compounding Knowledge with AgentCore
yusukeshimizu
1
150
Go 1.27 の標準パッケージに uuid が入った!のでいろいろ喋る / go_127_std_go_uuid
convto
2
530
도구에서 동료까지: 10년차 AI 스타트업의 AI 적응기
inureyes
PRO
1
250
なぜ Temporal の大小比較には compare しかないのか / Why Does Temporal Only Have compare() for Comparisons
kazukihayase
1
180
Featured
See All Featured
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.4k
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
3
450
Docker and Python
trallard
47
4.1k
Odyssey Design
rkendrick25
PRO
2
770
How GitHub (no longer) Works
holman
316
150k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
370
Raft: Consensus for Rubyists
vanstee
141
7.6k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
220
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
73
41k
WCS-LA-2024
lcolladotor
0
800
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
700
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
540
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