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
180
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
97
What's coming in Rails 5.2, and sneak peek into Rails 6
sikachu
6
6k
Zero-downtime payment platforms
sikachu
2
270
Introduction to Active Support
sikachu
0
180
Hidden gems in Ruby on Rails
sikachu
5
290
Active Support Secrets
sikachu
1
280
Dependencies Testing With Appraisal And Bundler
sikachu
1
380
You have to test multiple versions of your gem's dependencies. You used Appraisal. It's super affective!
sikachu
0
430
Zero-downtime payment platforms
sikachu
1
130
Other Decks in Technology
See All in Technology
短期間でRAGシステムを実現 お客様と歩んだ生成AI内製化への道のり
taka0709
1
190
実践マルチモーダル検索!
shibuiwilliam
3
570
戦えるAIエージェントの作り方
iwiwi
22
11k
データとAIで明らかになる、私たちの課題 ~Snowflake MCP,Salesforce MCPに触れて~ / Data and AI Insights
kaonavi
0
330
ピープルウエア x スタートアップ
operando
2
3.4k
Giving Tuesday Auctria Set-Up 2025
auctria
PRO
0
100
JAWS UG AI/ML #32 Amazon BedrockモデルのライフサイクルとEOL対応/How Amazon Bedrock Model Lifecycle Works
quiver
1
820
Oracle Database@Google Cloud:サービス概要のご紹介
oracle4engineer
PRO
0
430
abema-trace-sampling-observability-cost-optimization
tetsuya28
0
480
dbtとAIエージェントを組み合わせて見えたデータ調査の新しい形
10xinc
7
1.8k
kotlin-lsp の開発開始に触発されて、Emacs で Kotlin 開発に挑戦した記録 / kotlin‑lsp as a Catalyst: My Journey to Kotlin Development in Emacs
nabeo
2
330
LLM APIを2年間本番運用して苦労した話
ivry_presentationmaterials
10
8k
Featured
See All Featured
Docker and Python
trallard
46
3.6k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
359
30k
The Invisible Side of Design
smashingmag
302
51k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.1k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.5k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
127
54k
Navigating Team Friction
lara
190
15k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
1.7k
Optimising Largest Contentful Paint
csswizardry
37
3.5k
The Pragmatic Product Professional
lauravandoore
36
7k
Optimizing for Happiness
mojombo
379
70k
Done Done
chrislema
186
16k
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