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
NSOutlineView何もわからん:( 前編 / I Don't Understand About NSOutlineView :( Pt. 1
usagimaru
0
340
よくできたテンプレート言語として TypeScript + JSX を利用する試み / Using TypeScript + JSX outside of Web Frontend #TSKaigiKansai
izumin5210
6
1.8k
subpath importsで始めるモック生活
10tera
0
320
受け取る人から提供する人になるということ
little_rubyist
0
250
What’s New in Compose Multiplatform - A Live Tour (droidcon London 2024)
zsmb
1
480
flutterkaigi_2024.pdf
kyoheig3
0
150
Modular Monolith Monorepo ~シンプルさを保ちながらmonorepoのメリットを最大化する~
yuisakamoto
5
330
RubyLSPのマルチバイト文字対応
notfounds
0
120
Amazon Bedrock Agentsを用いてアプリ開発してみた!
har1101
0
340
TypeScriptでライブラリとの依存を限定的にする方法
tutinoko
3
710
デザインパターンで理解するLLMエージェントの作り方 / How to develop an LLM agent using agentic design patterns
rkaga
3
340
AI時代におけるSRE、 あるいはエンジニアの生存戦略
pyama86
6
1.2k
Featured
See All Featured
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
250
21k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
How to Think Like a Performance Engineer
csswizardry
20
1.1k
Keith and Marios Guide to Fast Websites
keithpitt
409
22k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
44
2.2k
Done Done
chrislema
181
16k
RailsConf 2023
tenderlove
29
900
Practical Orchestrator
shlominoach
186
10k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
26
2.1k
Designing Experiences People Love
moore
138
23k
Optimizing for Happiness
mojombo
376
70k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
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