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
Scalable Customer Journey Orchestration (CJO)
lewuathe
0
410
What We Can Learn From OSS
inouehi
0
430
Micro Frontends for Java Microservices - Utah JUG 2024
mraible
PRO
1
100
Next.js App Router
quramy
11
1.6k
大規模UIKitベースアプリへのTCAの段階的導入/gradual-adoption-of-tca-in-a-large-scale-uikit-based-app
takehilo
2
200
サイコロで理解する統計的仮説検定の考え方
tatamiya
4
1k
CREってこういうこと? 体験入社 - 提案資料 - / what-is-cre-trial-employment
shinden
1
500
ADRを一年運用してみた/adr_after_a_year
hanhan1978
7
2.4k
Going beyond Apache Parquet's default settings
xhochy
0
120
MetricKitで予期せぬ終了を検知する話 / Detect unexpected termination with MetricKit
nekowen
1
200
Build Apps for iOS, Android & Desktop in 100% Kotlin With Compose Multiplatform (mDevCamp 2024)
zsmb
0
420
Behind VS Code Extensions for JavaScript / TypeScript Linnting and Formatting
unvalley
6
1.1k
Featured
See All Featured
BBQ
matthewcrist
80
8.8k
Making the Leap to Tech Lead
cromwellryan
125
8.5k
Building Your Own Lightsaber
phodgson
100
5.7k
Build The Right Thing And Hit Your Dates
maggiecrowley
25
2k
Debugging Ruby Performance
tmm1
70
11k
Large-scale JavaScript Application Architecture
addyosmani
504
110k
Done Done
chrislema
178
15k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
222
21k
A Modern Web Designer's Workflow
chriscoyier
689
190k
Typedesign – Prime Four
hannesfritz
36
2.1k
Embracing the Ebb and Flow
colly
80
4.2k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
19
6.9k
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