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
140
Debugging your Apps with Google Chrome and Sencha
arthurakay
1
220
Announcing Ext JS 5
arthurakay
0
130
Conquering the Command Line
arthurakay
0
250
The Future of Enterprise App Development
arthurakay
0
120
Best Practices for Enterprise JavaScript Applications
arthurakay
7
2.4k
Bringing the Mobile Web to the Cloud
arthurakay
2
550
Building Native Windows 8 Apps with Sencha
arthurakay
0
240
Creating Windows 8 Apps with Ext JS
arthurakay
1
280
Other Decks in Technology
See All in Technology
Shopifyアプリ開発における Shopifyの機能活用
sonatard
4
250
iOS/Androidで同じUI体験をネ イティブで作成する際に気をつ けたい落とし穴
fumiyasac0921
1
110
リンクアンドモチベーション ソフトウェアエンジニア向け紹介資料 / Introduction to Link and Motivation for Software Engineers
lmi
4
300k
エンジニア人生の拡張性を高める 「探索型キャリア設計」の提案
tenshoku_draft
1
130
VideoMamba: State Space Model for Efficient Video Understanding
chou500
0
190
初心者向けAWS Securityの勉強会mini Security-JAWSを9ヶ月ぐらい実施してきての近況
cmusudakeisuke
0
130
OCI Security サービス 概要
oracle4engineer
PRO
0
6.5k
TanStack Routerに移行するのかい しないのかい、どっちなんだい! / Are you going to migrate to TanStack Router or not? Which one is it?
kaminashi
0
600
IBC 2024 動画技術関連レポート / IBC 2024 Report
cyberagentdevelopers
PRO
1
110
Amazon CloudWatch Network Monitor のススメ
yuki_ink
1
210
TypeScriptの次なる大進化なるか!? 条件型を返り値とする関数の型推論
uhyo
2
1.7k
【Startup CTO of the Year 2024 / Audience Award】アセンド取締役CTO 丹羽健
niwatakeru
0
1.3k
Featured
See All Featured
Intergalactic Javascript Robots from Outer Space
tanoku
269
27k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Git: the NoSQL Database
bkeepers
PRO
427
64k
Six Lessons from altMBA
skipperchong
27
3.5k
The World Runs on Bad Software
bkeepers
PRO
65
11k
Faster Mobile Websites
deanohume
305
30k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
Writing Fast Ruby
sferik
627
61k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
364
24k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
26
2.1k
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