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
Front-end Testing with CasperJS
Search
vitrum.zhu
February 19, 2013
Programming
3
180
Front-end Testing with CasperJS
Front-end Testing with CasperJS
vitrum.zhu
February 19, 2013
Tweet
Share
Other Decks in Programming
See All in Programming
TokyoR116_BeginnersSession1_環境構築
kotatyamtema
0
110
Djangoアプリケーション 運用のリアル 〜問題発生から可視化、最適化への道〜 #pyconshizu
kashewnuts
1
230
個人アプリを2年ぶりにアプデしたから褒めて / I just updated my personal app, praise me!
lovee
0
340
動作確認やテストで漏れがちな観点3選
starfish719
6
1k
Honoとフロントエンドの 型安全性について
yodaka
4
250
How mixi2 Uses TiDB for SNS Scalability and Performance
kanmo
29
11k
Introduction to kotlinx.rpc
arawn
0
630
AWS Organizations で実現する、 マルチ AWS アカウントのルートユーザー管理からの脱却
atpons
0
130
Honoをフロントエンドで使う 3つのやり方
yusukebe
4
2.1k
Writing documentation can be fun with plugin system
okuramasafumi
0
120
法律の脱レガシーに学ぶフロントエンド刷新
oguemon
5
730
自分ひとりから始められる生産性向上の取り組み #でぃーぷらすオオサカ
irof
8
2.6k
Featured
See All Featured
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
59k
We Have a Design System, Now What?
morganepeng
51
7.4k
Making the Leap to Tech Lead
cromwellryan
133
9.1k
Code Reviewing Like a Champion
maltzj
521
39k
Why Our Code Smells
bkeepers
PRO
335
57k
YesSQL, Process and Tooling at Scale
rocio
171
14k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
129
19k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
The Pragmatic Product Professional
lauravandoore
32
6.4k
Making Projects Easy
brettharned
116
6k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
7.1k
Building a Scalable Design System with Sketch
lauravandoore
460
33k
Transcript
Front-‐end Tes,ng with CasperJS Glamour Sales
China Vitrum Zhu 2013.2
• Old way and new way • About CasperJS
• Unit Test • UI Test
The finger and eye will told you. Old!
• Headless browser • Based on Webkit •
Controllable by command line • Full Javascript API
WebKit inside
CasperJS • browsing naviga,on steps • filling & submiRng
forms • capturing screenshots • tes,ng remote DOM • logging events • downloading resources • wri,ng func,onal test suites, saving results (with Node.js we can save results to any format. Like XML, TXT, JSON)
Quick Overview
Quick Overview Now run the following in the terminal:
casperjs test duckduck.js You should get something cool like the following:
CasperJS @ GLS • Web Crawler (web page spider)
• Simula,on Client access • Help Barnish create cache before customer visit
More techniques • hbp://Nodejs.org • hbp://casperjs.org • hbp://phantomjs.org/
Thanks! @vitrum Fork it! hbps://github.com/vitrum/nm-‐test/tree/ master/casperjs