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
Testing Ext JS 5 Applications with Siesta
Search
Mats Bryntse
December 02, 2014
Technology
1
130
Testing Ext JS 5 Applications with Siesta
From SenchaDay 2014 in Karlsruhe
Mats Bryntse
December 02, 2014
Tweet
Share
More Decks by Mats Bryntse
See All by Mats Bryntse
Expect the unexpected - How to deal with JavaScript errors in web applications
mats
1
80
Creating Reusable UI Components with Ext JS
mats
2
1k
Dealing with javascript errors in SPAs
mats
0
140
Record.Replay.Reproduce
mats
0
160
Expect the unexpected
mats
0
430
Record.Replay.Reproduce - Dealing with JS errors in modern web apps
mats
0
480
Unit and UI Testing Your Ext JS Web Applications with Siesta
mats
0
220
Siesta Deep Dive
mats
0
330
JavaScript Testing and Continuous Integration
mats
1
160
Other Decks in Technology
See All in Technology
生成AI導入の効果を最大化する データ活用戦略
ham0215
0
120
Amazon Q Developerを活用したアーキテクチャのリファクタリング
k1nakayama
2
200
Claude Codeが働くAI中心の業務システム構築の挑戦―AIエージェント中心の働き方を目指して
os1ma
9
2k
反脆弱性(アンチフラジャイル)とデータ基盤構築
cuebic9bic
3
170
リリース2ヶ月で収益化した話
kent_code3
1
220
データ基盤の管理者からGoogle Cloud全体の管理者になっていた話
zozotech
PRO
0
410
2時間で300+テーブルをデータ基盤に連携するためのAI活用 / FukuokaDataEngineer
sansan_randd
0
140
【CEDEC2025】現場を理解して実現!ゲーム開発を効率化するWebサービスの開発と、利用促進のための継続的な改善
cygames
PRO
0
750
ロールが細分化された組織でSREと協働するインフラエンジニアは何をするか? / SRE Lounge #18
kossykinto
0
210
AIのグローバルトレンド 2025 / ai global trend 2025
kyonmm
PRO
1
130
金融サービスにおける高速な価値提供とAIの役割 #BetAIDay
layerx
PRO
1
780
Oracle Cloud Infrastructure:2025年7月度サービス・アップデート
oracle4engineer
PRO
1
150
Featured
See All Featured
Intergalactic Javascript Robots from Outer Space
tanoku
272
27k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
131
19k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
29
9.6k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Why You Should Never Use an ORM
jnunemaker
PRO
58
9.5k
Optimising Largest Contentful Paint
csswizardry
37
3.4k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
47
9.6k
Building Flexible Design Systems
yeseniaperezcruz
328
39k
Adopting Sorbet at Scale
ufuk
77
9.5k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.5k
Gamification - CAS2011
davidbonilla
81
5.4k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
15
1.6k
Transcript
Copyright Sencha Inc. 2014 Mats Bryntse, Bryntum Testing Ext JS
5 Apps @Bryntum
Intro | DESCRIPTION Who am I?
Webinar | Content Unit tests UI tests Continuous Integration •
Writing a unit test • Using PhantomJS • Hello world sample • Event recorder intro • Testing an Ext JS cmp • Recording a UI test • TeamCity • Code Coverage • Statistics • Cloud Testing
Intro | DESCRIPTION Less Theory, More Real World
Intro | WHY Why Testing?
Intro | WHY Hands up: Who is testing their JS?
Intro | WHY
Intro | WHY 1. Productivity & confidence in code 2.
Frameworks contain bugs 3. So does your code (and mine) 4. Refactoring & code handover 5. Fix bugs once
Intro | TERMINOLOGY Terminology: what does testing mean for a
JS developer?
Intro | TERMINOLOGY Unit tests, UI tests, Application tests..?
Intro | TERMINOLOGY Unit tests App Tests UI tests
Testing With Siesta Introduction
Intro | Testing with Siesta • runs in any browser
• is written in plain JS • is sandboxed by default A Siesta test…
Intro | Testing with Siesta • can do both UI
and unit testing • can be automated using PhantomJS or Selenium WebDriver • can detect leaked global variables A Siesta test…
Intro | Testing with Siesta describe('A simple Model test', function
(t) { t.it('Should do something', function(t) { // Test things t.expect(1).toBe(1); }); });
Unit Tests Red, Green, Refactor
Unit tests | Intro •Unit tests usually only involve “raw”
JS •Run very fast •Perfect for pre-commit hooks •Disable sandboxing if possible
Unit tests | Intro •Should be your #1 priority •Cover
your most important JS classes •Run often, before commit, daily, nightly. •Use TDD approach + BDD style for readability
Unit tests | TDD basics 1. Make the unit test
fail 2. Implement 3. Make the test pass 4. Refactor, Repeat
Unit tests | Writing a unit test Unit testing demo
Testing your UI Functional testing
UI tests | Intro Manually writing UI tests takes time
UI tests | Intro UI tests are more fragile &
run slower than unit tests
UI tests | Intro Understanding CSS and ComponentQuery is key
UI tests | Intro •UI “unit test” of a single
UI component •Or Application test, open index.html and test it Two main types of UI tests
UI tests | Intro UI Unit test demo
UI tests | Intro Siesta Event Recorder
UI tests | Event recorder •Great for application tests •Records
user actions: clicks, types, drag drop •Exports actions to a Siesta test case •Can be used by a non-programmer •Big timesaver
UI tests | Event recorder Let’s try the recorder
UI tests | Monkey tests Monkey testing
UI tests | Monkey tests •Random UI testing •Clicks, drags
etc. in your UI •Finds unhandled exceptions •Free testing help. 0€
UI tests | Monkey tests Cost breakdown: 5€ * 0
= 0 5€
Continuous Integration TeamCity, Code Coverage & Statistics
Continuous Integration | Intro •Bryntum uses TeamCity, Siesta integrates with
others (Jenkins…) •Test suites run every 2 hours in Chrome •Full test suites executed nightly •Reports, statistics, charts and code coverage
Continuous Integration | TeamCity Let’s checkout TeamCity
UI tests | Cloud testing So…running in multiple browsers?
Continuous Integration | Cloud testing •Need to create Virtual Machines
for each version of IE •Total: Chrome, Safari, FF, IE 7-11 => 7 VMs •Managing such a farm can be very time consuming
Continuous Integration | Cloud testing •Siesta integrates with both BrowserStack
and Sauce Labs •Run tests easily in any OS and Browser combination •No need to setup your own VM farm •Read more on the Bryntum blog…
Continuous Integration | Cloud testing Launching tests in BrowserStack
Rounding up | Links •bryntum.com/products/siesta •bryntum.com/docs/siesta •teamcity.bryntum.com/guest •browserstack.com/ •saucelabs.com/
Rounding up | Questions Questions? Twitter: @Bryntum