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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
vitrum.zhu
February 19, 2013
Programming
190
3
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Front-end Testing with CasperJS
Front-end Testing with CasperJS
vitrum.zhu
February 19, 2013
Other Decks in Programming
See All in Programming
変わらないものが、変わるものを決める — 意図駆動開発 × イベントソーシング × イミュータブル | What Doesn't Change Decides What Can — IDD × Event Sourcing × Immutability
tomohisa
0
1.8k
Go 1.27 における memory allocation の高速化
andpad
0
250
PHP Application における Kubernetes 内 gRPC 通信
ganchiku
0
600
S3 を使うアプリケーションをローカル完結で動かすことに全力を注いでみた / Running S3 Apps Offline
contour_gara
0
540
php-fpmのプロセスが枯渇した日-調査・対処・そして本当にやるべきだったこと-
shibuchaaaan
0
320
Go言語とトイモデルで学ぶTransformerの気持ち / fukuokago23-transformer
monochromegane
0
180
AI時代のPHPer生存戦略 ~「言語、もうなんでもよくない?」に本気で向き合う~
vivion
0
820
Jindong: Introducing Declarative Haptics in Compose Multiplatform
l2hyunwoo
0
120
テーブルをDELETEした
yuzneri
0
150
リアルな遅延を測る仕様
kota_yata
1
120
2年かけて Deno に DOMMatrix を実装した話 / How I implemented DOMMatrix in Deno over two years
petamoriken
0
210
in-process GraphQL のすすめ #ginzajs
izumin5210
4
1.4k
Featured
See All Featured
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
420
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
770
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
370
Typedesign – Prime Four
hannesfritz
42
3.1k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
11k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
370
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
650
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
410
Why Our Code Smells
bkeepers
PRO
340
58k
Writing Fast Ruby
sferik
630
63k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
500
From π to Pie charts
rasagy
0
300
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