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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Arthur Kay
June 05, 2012
Technology
1
130
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
160
Debugging your Apps with Google Chrome and Sencha
arthurakay
1
290
Announcing Ext JS 5
arthurakay
0
150
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
580
Building Native Windows 8 Apps with Sencha
arthurakay
0
260
Creating Windows 8 Apps with Ext JS
arthurakay
1
290
Other Decks in Technology
See All in Technology
"作る"から"使われる"へ:Backstage 活用の現在地
sbtechnight
0
230
GitHub Copilot CLI で Azure Portal to Bicep
tsubakimoto_s
0
130
LINEヤフーにおけるAIOpsの現在地
lycorptech_jp
PRO
4
1.5k
詳解 強化学習 / In-depth Guide to Reinforcement Learning
prinlab
0
340
_Architecture_Modernization_から学ぶ現状理解から設計への道のり.pdf
satohjohn
2
570
CyberAgentの生成AI戦略 〜変わるものと変わらないもの〜
katayan
0
280
モジュラモノリス導入から4年間の総括:アーキテクチャと組織の相互作用について / Architecture and Organizational Interaction
nazonohito51
3
1.2k
スケールアップ企業でQA組織が機能し続けるための組織設計と仕組み〜ボトムアップとトップダウンを両輪としたアプローチ〜
tarappo
3
290
TypeScript 7.0の現在地と備え方
uhyo
7
2k
Phase04_ターミナル基礎
overflowinc
0
630
Kiro Powers 入門
k_adachi_01
0
130
Phase09_自動化_仕組み化
overflowinc
0
470
Featured
See All Featured
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.4k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
790
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
1.9k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
250
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
200
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
1
490
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
400
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
75
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.8k
It's Worth the Effort
3n
188
29k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.2k
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