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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Prem Sichanugrist
November 16, 2014
Technology
210
1
Share
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
110
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
210
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
470
Zero-downtime payment platforms
sikachu
1
160
Other Decks in Technology
See All in Technology
もっとコンテンツをよく構造化して理解したいので、LLM 時代こそ Taxonomy の設計品質に目を向けたい〜!
morinota
0
120
社内エンジニア勉強会の醍醐味と苦しみ/tamadev
nishiuma
0
270
Fabric MCPの紹介と使い分け
ryomaru0825
1
110
ハーネスエンジニアリングをやりすぎた話 ~そのハーネスは解体された~
gotalab555
5
1.9k
AIが盛んな時代に 技術記事を書き始めて起きた私の中での小さな変化
peintangos
0
340
Shipping AI Agents — Lessons from Production
vvatanabe
0
300
COBOL婆さんの伝説
poropinai1966
0
130
AIが自律的に働く時代へ Amazon Quick で実現するAIエージェント紹介
koheiyoshikawa
0
160
知ってた?JavaScriptの"正しさ"を検証するテストが5万以上もあること(Test262)
riyaamemiya
0
110
基盤を育てる 外部SaaS連携の運用
gamonges_dresscode
1
130
独断と偏見で試してみる、 シングル or マルチエージェント どっちがいいの?
shichijoyuhi
1
220
AWS Agent Registry の基礎・概要を理解する/aws-agent-registry-intro
ren8k
3
430
Featured
See All Featured
Designing Experiences People Love
moore
143
24k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.2k
Large-scale JavaScript Application Architecture
addyosmani
515
110k
RailsConf 2023
tenderlove
30
1.4k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.4k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
25k
Java REST API Framework Comparison - PWX 2021
mraible
34
9.3k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
23k
Google's AI Overviews - The New Search
badams
0
990
KATA
mclloyd
PRO
35
15k
Information Architects: The Missing Link in Design Systems
soysaucechin
0
900
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