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
1
120
Unit Testing Sencha Applications
Arthur Kay
June 05, 2012
Tweet
Share
More Decks by Arthur Kay
See All by Arthur Kay
Analyzing the ROI of JavaScript in Enterprise Software Development
arthurakay
0
150
Debugging your Apps with Google Chrome and Sencha
arthurakay
1
260
Announcing Ext JS 5
arthurakay
0
140
Conquering the Command Line
arthurakay
0
310
The Future of Enterprise App Development
arthurakay
0
130
Best Practices for Enterprise JavaScript Applications
arthurakay
7
2.5k
Bringing the Mobile Web to the Cloud
arthurakay
2
550
Building Native Windows 8 Apps with Sencha
arthurakay
0
250
Creating Windows 8 Apps with Ext JS
arthurakay
1
290
Other Decks in Technology
See All in Technology
roppongirb_20250911
igaiga
1
210
Rustから学ぶ 非同期処理の仕組み
skanehira
1
130
AWSで始める実践Dagster入門
kitagawaz
1
590
「どこから読む?」コードとカルチャーに最速で馴染むための実践ガイド
zozotech
PRO
0
290
なぜテストマネージャの視点が 必要なのか? 〜 一歩先へ進むために 〜
moritamasami
0
210
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
8.7k
Webアプリケーションにオブザーバビリティを実装するRust入門ガイド
nwiizo
6
760
職種の壁を溶かして開発サイクルを高速に回す~情報透明性と職種越境から考えるAIフレンドリーな職種間連携~
daitasu
0
140
Obsidian応用活用術
onikun94
1
470
JTCにおける内製×スクラム開発への挑戦〜内製化率95%達成の舞台裏/JTC's challenge of in-house development with Scrum
aeonpeople
0
200
品質視点から考える組織デザイン/Organizational Design from Quality
mii3king
0
200
DDD集約とサービスコンテキスト境界との関係性
pandayumi
3
280
Featured
See All Featured
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
GitHub's CSS Performance
jonrohan
1032
460k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
8
920
The Illustrated Children's Guide to Kubernetes
chrisshort
48
50k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
111
20k
For a Future-Friendly Web
brad_frost
180
9.9k
Stop Working from a Prison Cell
hatefulcrawdad
271
21k
The Cost Of JavaScript in 2023
addyosmani
53
8.9k
The Art of Programming - Codeland 2020
erikaheidi
55
13k
Statistics for Hackers
jakevdp
799
220k
Building an army of robots
kneath
306
46k
Designing for humans not robots
tammielis
253
25k
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