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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Arthur Kay
June 05, 2012
Technology
130
1
Share
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
170
Debugging your Apps with Google Chrome and Sencha
arthurakay
1
290
Announcing Ext JS 5
arthurakay
0
160
Conquering the Command Line
arthurakay
0
360
The Future of Enterprise App Development
arthurakay
0
140
Best Practices for Enterprise JavaScript Applications
arthurakay
7
2.6k
Bringing the Mobile Web to the Cloud
arthurakay
2
590
Building Native Windows 8 Apps with Sencha
arthurakay
0
270
Creating Windows 8 Apps with Ext JS
arthurakay
1
300
Other Decks in Technology
See All in Technology
AWS DevOps Agentはチームメイトになれるのか?/ Can AWS DevOps Agent become a teammate
kinunori
6
780
AIコーディング時代における、ソフトウェアサプライチェーン攻撃に対する防衛術(簡易版)
soysoysoyb
0
150
小説執筆のハーネスエンジニアリング
yoshitetsu
0
810
バイブコーディングで3倍早く⚪⚪を作ってみた
samakada
0
160
ServiceNow Knowledge 26 の歩き方
manarobot
0
200
ハーネスエンジニアリングの概要と設計思想
sergicalsix
9
5.4k
AIが書いたコードを信じられない問題 〜レビュー負荷を下げるために変えたこと〜 / The AI Code Trust Gap: Reducing the Review Burden
bitkey
PRO
8
1.4k
「AIに部下10人」を3ヶ月運用してわかった、生成AI駆動開発のリアル
yoheinabe777
0
100
Oracle Cloud Infrastructure:2026年4月度サービス・アップデート
oracle4engineer
PRO
0
110
AI와 협업하는 조직으로의 여정
arawn
0
530
AIが盛んな時代に 技術記事を書き始めて起きた私の中での小さな変化
peintangos
0
240
AndroidアプリとCopilot Studioの統合
nakasho
0
170
Featured
See All Featured
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
490
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.4k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
25k
The Pragmatic Product Professional
lauravandoore
37
7.2k
Exploring anti-patterns in Rails
aemeredith
3
330
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.2k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
55k
Raft: Consensus for Rubyists
vanstee
141
7.4k
YesSQL, Process and Tooling at Scale
rocio
174
15k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
170
Between Models and Reality
mayunak
3
270
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