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
220
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
データと地図で読む 大井町の「かわるもの、かわらないもの」
yoshiyama_hana
0
650
データ活用研修 データマネジメント【MIXI 26新卒技術研修】
mixi_engineers
PRO
4
780
A Bag-of-Documents Model for Query Specificity
dtunkelang
0
170
システム監視入門
grimoh
5
760
新しい SLO が良い感じにハマっている話
z63d
0
120
NetBoxを利用した作業効率化の試み_NetDevNight4
tnoha
0
360
コンポーネント名には何を含めるべきなのか? / what-should-be-included-in-component-names
airrnot1106
0
180
AI工学特論: MLOps・継続的評価
asei
11
3k
歴史から理解するクラウドインフラのしくみ
kizawa2020
0
190
データ活用研修 問いの発見と仮説構築【MIXI 26新卒技術研修】
mixi_engineers
PRO
1
670
DevOps Agentで運用判断をチーム資産にする~Agent InstructionsとAgent Skillを継続的に育てる~
fujioka6789
0
170
Power Automateアップデート情報
miyakemito
0
280
Featured
See All Featured
We Are The Robots
honzajavorek
0
290
Google's AI Overviews - The New Search
badams
0
1.1k
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
420
Thoughts on Productivity
jonyablonski
76
5.3k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
390
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.9k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
400
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.2k
Accessibility Awareness
sabderemane
1
170
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
880
Being A Developer After 40
akosma
91
590k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.5k
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