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
290
Introduction to Active Support
sikachu
0
200
Hidden gems in Ruby on Rails
sikachu
5
310
Active Support Secrets
sikachu
1
300
Dependencies Testing With Appraisal And Bundler
sikachu
1
490
You have to test multiple versions of your gem's dependencies. You used Appraisal. It's super affective!
sikachu
0
460
Zero-downtime payment platforms
sikachu
1
150
Other Decks in Technology
See All in Technology
SLI/SLO 導入で 避けるべきこと3選
yagikota
0
140
SSoT(Single Source of Truth)で「壊して再生」する設計
kawauso
2
300
_Architecture_Modernization_から学ぶ現状理解から設計への道のり.pdf
satohjohn
2
700
AgentCoreとLINEを使った飲食店おすすめアプリを作ってみた
yakumo
2
180
LINEヤフーにおけるAIOpsの現在地
lycorptech_jp
PRO
5
2.1k
ソフトバンク流!プラットフォームエンジニアリング実現へのアプローチ
sbtechnight
1
250
ADK + Gemini Enterprise で 外部 API 連携エージェント作るなら OAuth の仕組みを理解しておこう
kaz1437
0
150
俺の/私の最強アーキテクチャ決定戦開催 ― チームで新しいアーキテクチャに適合していくために / 20260322 Naoki Takahashi
shift_evolve
PRO
1
410
開発チームとQAエンジニアの新しい協業モデル -年末調整開発チームで実践する【QAリード施策】-
qa
0
120
Phase09_自動化_仕組み化
overflowinc
0
1.4k
"作る"から"使われる"へ:Backstage 活用の現在地
sbtechnight
0
240
スピンアウト講座05_実践活用事例
overflowinc
0
970
Featured
See All Featured
30 Presentation Tips
portentint
PRO
1
260
Code Review Best Practice
trishagee
74
20k
Context Engineering - Making Every Token Count
addyosmani
9
770
How to Think Like a Performance Engineer
csswizardry
28
2.5k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.4k
Ethics towards AI in product and experience design
skipperchong
2
230
Optimising Largest Contentful Paint
csswizardry
37
3.6k
How to make the Groovebox
asonas
2
2k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
650
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
150
Bash Introduction
62gerente
615
210k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
22k
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