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
190
3
Share
Front-end Testing with CasperJS
Front-end Testing with CasperJS
vitrum.zhu
February 19, 2013
Other Decks in Programming
See All in Programming
今さら聞けないCancellationToken
htkym
0
190
CLIであることを活かしたGitHub Copilot CLI活用術 / GitHub Copilot CLI Pro Tips & Tricks
nao_mk2
1
1.1k
Skillは並べた。動かなかった。契約で繋いだ。— 65個のSkillから、自走する開発サイクルへ
junholee
0
760
生成AI時代にこそ効くGo | Why Go Works in the Age of Generative AI
mom0tomo
7
2.3k
oxlintはeslint/typescript-eslintを置き換えられるのか
shomafujita
2
230
脅威をエンジニアリングの糧にして――現場編 / Turning Threats into Engineering Fuel — Field Edition
nrslib
0
180
inferと仲良くなる10分間
ryokatsuse
1
250
プロパティの順序で型推論が壊れる!? TypeScript6.0の修正からContext-Sensitivityの仕組みを追う
bicstone
2
1.1k
Claspは野良GASの夢をみるか
takter00
0
110
OCRを使ってゲームのアイテムをデータ化する
kishikawakatsumi
0
120
New "Type" system on PicoRuby
pocke
1
180
Lemonade + Foundry Toolkit でお手軽アプリ開発
seosoft
1
150
Featured
See All Featured
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.3k
Typedesign – Prime Four
hannesfritz
42
3k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
How to build a perfect <img>
jonoalderson
1
5.5k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
4k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
370
Game over? The fight for quality and originality in the time of robots
wayneb77
1
180
Being A Developer After 40
akosma
91
590k
What's in a price? How to price your products and services
michaelherold
247
13k
RailsConf 2023
tenderlove
30
1.4k
Java REST API Framework Comparison - PWX 2021
mraible
34
9.3k
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