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
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
160
Debugging your Apps with Google Chrome and Sencha
arthurakay
1
280
Announcing Ext JS 5
arthurakay
0
140
Conquering the Command Line
arthurakay
0
350
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
570
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
レガシー共有バッチ基盤への挑戦 - SREドリブンなリアーキテクチャリングの取り組み
tatsukoni
0
210
変化するコーディングエージェントとの現実的な付き合い方 〜Cursor安定択説と、ツールに依存しない「資産」〜
empitsu
4
1.3k
AzureでのIaC - Bicep? Terraform? それ早く言ってよ会議
torumakabe
1
510
Sansan Engineering Unit 紹介資料
sansan33
PRO
1
3.8k
小さく始めるBCP ― 多プロダクト環境で始める最初の一歩
kekke_n
1
380
Bill One 開発エンジニア 紹介資料
sansan33
PRO
4
17k
AIエージェントを開発しよう!-AgentCore活用の勘所-
yukiogawa
0
140
会社紹介資料 / Sansan Company Profile
sansan33
PRO
15
400k
SREチームをどう作り、どう育てるか ― Findy横断SREのマネジメント
rvirus0817
0
130
usermode linux without MMU - fosdem2026 kernel devroom
thehajime
0
230
Amazon S3 Vectorsを使って資格勉強用AIエージェントを構築してみた
usanchuu
3
450
Greatest Disaster Hits in Web Performance
guaca
0
200
Featured
See All Featured
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.6k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
210
Into the Great Unknown - MozCon
thekraken
40
2.3k
How to Talk to Developers About Accessibility
jct
2
130
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.4k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.4k
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.3k
Mobile First: as difficult as doing things right
swwweet
225
10k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
1
1.4k
How To Stay Up To Date on Web Technology
chriscoyier
791
250k
Site-Speed That Sticks
csswizardry
13
1.1k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
0
430
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