Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
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
140
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Unit Testing Sencha Applications
Arthur Kay
June 05, 2012
Transcript
21 slides
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
More Decks by Arthur Kay
See All by Arthur Kay
Analyzing the ROI of JavaScript in Enterprise Software Development
arthurakay
0
190
Debugging your Apps with Google Chrome and Sencha
arthurakay
1
340
Announcing Ext JS 5
arthurakay
0
180
Conquering the Command Line
arthurakay
0
390
The Future of Enterprise App Development
arthurakay
0
170
Best Practices for Enterprise JavaScript Applications
arthurakay
7
2.6k
Bringing the Mobile Web to the Cloud
arthurakay
2
620
Building Native Windows 8 Apps with Sencha
arthurakay
0
290
Creating Windows 8 Apps with Ext JS
arthurakay
1
320
Other Decks in Technology
See All in Technology
専門家に使ってもらうAIプロダクトをつくる - 病院の医事課向けDPCコーディング支援システムの設計と評価
hagino3000
4
1.1k
AWS DevOps Agentの構造から読み解く運用 AI エージェントの設計原則/aws-devops-agent-design-principles
tomoki10
0
320
対話 AI プラットフォーム「アイブリー」で実践する自然言語処理と事業開発
ivry_presentationmaterials
0
220
Well, that’s weird…
csswizardry
3
260
その修正で本当に速くなったのか? k6とOpenTelemetryで確かめる性能改善 / Performance review with k6 and OpenTelemetry
ymotongpoo
3
490
全てを疑え!非自明な挙動と異常系から考える堅牢なカスタムコントローラ開発入門(CNDW2026)
lycorptech_jp
PRO
0
120
技術書典で本を売る流れ
yoshimura_datam
0
210
想定外の利用がプロダクトの価値を広げる
lycorptech_jp
PRO
0
140
データ界隈LT祭の運営のふりかえり
yoshimura_datam
0
110
PR 生成AIガバナンスの全体像がわかる本
yoshimura_datam
0
130
AI時代に問い直す「プロダクションミーティング」の価値 〜チームでサービスの信頼性を高める取り組み〜
mackerelio
0
180
LLMごとの文章力を測ってみた話
yoshimura_datam
0
130
Featured
See All Featured
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
790
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
203
77k
The browser strikes back
jonoalderson
0
2k
Technical Leadership for Architectural Decision Making
baasie
4
660
Testing 201, or: Great Expectations
jmmastey
46
8.4k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
580
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.6k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2.2k
Fireside Chat
paigeccino
43
4.1k
Rails Girls Zürich Keynote
gr2m
96
14k
Done Done
chrislema
187
17k
Git: the NoSQL Database
bkeepers
PRO
433
67k