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
Unit Testing Sencha Applications
Search
Arthur Kay
June 05, 2012
Technology
130
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Unit Testing Sencha Applications
Arthur Kay
June 05, 2012
More Decks by Arthur Kay
See All by Arthur Kay
Analyzing the ROI of JavaScript in Enterprise Software Development
arthurakay
0
180
Debugging your Apps with Google Chrome and Sencha
arthurakay
1
320
Announcing Ext JS 5
arthurakay
0
170
Conquering the Command Line
arthurakay
0
370
The Future of Enterprise App Development
arthurakay
0
160
Best Practices for Enterprise JavaScript Applications
arthurakay
7
2.6k
Bringing the Mobile Web to the Cloud
arthurakay
2
610
Building Native Windows 8 Apps with Sencha
arthurakay
0
280
Creating Windows 8 Apps with Ext JS
arthurakay
1
300
Other Decks in Technology
See All in Technology
【GCC2026】大規模言語モデルを活用した内製検索サービスの社内展開や業務活用
bandainamcostudios
PRO
0
350
三人寄ればチューリング完全
puhitaku
4
1.6k
コーチングの奥義 何もしないテクニック
jinwatanabe
0
140
LLM・AIエージェントシステムベストプラクティス
shibuiwilliam
6
1.6k
猫付きpingコマンドを自作
uyuki234
0
280
会社紹介資料 / Sansan Company Profile
sansan33
PRO
24
430k
【CEDEC2026】Creative Approaches to Localizing the Dialects and Unique Speech of Umamusume: Pretty Derby Characters in English
cygames
PRO
4
26k
AI画像認識を活用したゲーム内決済処理検証の自動化
gree_tech
PRO
0
100
ハーレムエンジニアリング
kazuma777777
0
200
名刺メーカーDevグループ 紹介資料
sansan33
PRO
0
1.2k
MIXIで活躍できるエンジニアを 若手社員目線で考えてみる
mixi_engineers
PRO
0
110
小粒でもパワフルなJS Runtime Antjsについて
comamoca
0
110
Featured
See All Featured
How to Ace a Technical Interview
jacobian
281
24k
Believing is Seeing
oripsolob
1
200
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
210
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
68
57k
SEO for Brand Visibility & Recognition
aleyda
0
4.7k
Designing Powerful Visuals for Engaging Learning
tmiket
1
500
Site-Speed That Sticks
csswizardry
13
1.5k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
A better future with KSS
kneath
240
18k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
490
A designer walks into a library…
pauljervisheath
211
24k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
2
400
Transcript
Presented by Art Kay Unit Testing Sencha Applications
Who am I? ! Arthur Kay ! Solutions
Engineer at Sencha, Inc. ! Longtime ExtJS fanatic ! Web developer for 10+ years ! www.akawebdesign.com ! @arthurakay
Sencha Chicago User Group ! Looking for: !
Speakers ! Ideas ! Giveaways ! Sponsors ! GET INVOLVED!
Agenda ! Overview of Unit Testing concepts !
Tools ! Overview of “Prize Patrol” ! Questions
Disclaimer I do not assert that this presentation: !
is how Sencha tests products internally ! is how Sencha would recommend you test your applications This is just a presentation of materials that have helped me.
Test Driven JS Development
Book http://www.tddjs.com BUY. THIS. BOOK.
Unit Testing ! Confidence in your code. !
Syntax ! Unit Tests ! Integration Tests
Code Correctness ! Correct syntax ! jslint.com
Unit Tests ! “Units” tested in isolation !
Setup / Teardown ! Mocks / Stubs TDD: Must write testable code!
Integration Tests ! Interaction with Application
Isn’t that a lot of work? ! Yes. !
Automation is key! ! Version control hooks ! Build process
Unit Testing Tools
JS Testing Tools ! Syntax ! JS Lint
/ JS Hint ! Hammer.js ! Unit Tests ! Jasmine ! JsTestDriver ! Integration Tests ! Selenium ! Phantom.js
Automation ! Shell scripts ! IDE plugins !
(Or something more elegant…)
A Sencha Touch App: Prize Patrol https://github.com/arthurakay/Prize-Patrol
Testing a Sencha MVC App ! MVC separates presentation
from logic ! Easy to write testable “units” ! Should allow us to “drive” tests
Jasmine ! Testing the “testable” units ! Little
or no reliance on DOM ! Sencha uses Jasmine internally
JsTestDriver ! Automated test suites across browsers ! IntelliJ
IDE Plugin ! Command line control
Phantom.js ! Lint all JS files (PhantomLint) !
Execute all Unit Tests (Jasmine) ! Drive Integration Tests (Casper.js)
Questions