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
Angular Testing von A bis Z
Search
Fabian Gosebrink
October 11, 2017
Technology
240
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Angular Testing von A bis Z
AngularDays 2017 in Berlin - Testing from A to Z
Fabian Gosebrink
October 11, 2017
More Decks by Fabian Gosebrink
See All by Fabian Gosebrink
Advanced Signal Store: Structuring State for Real Angular Applications
fabiangosebrink
0
79
NgRx Signal Store - A Deeper Dive
fabiangosebrink
0
55
Modern Angular Apps in 2026
fabiangosebrink
0
95
Why State is the Most Important Part of Your Angular Application
fabiangosebrink
0
130
Angular testing made easy with Jest and Cypress
fabiangosebrink
0
160
Introducing state management into an application with NgRx
fabiangosebrink
0
240
Scalable architectures in Angular with Nx
fabiangosebrink
0
220
My Biggest Angular Mistakes and How To Avoid Them
fabiangosebrink
0
330
[iJS Munich] Better Angular Architectures with Libraries and Nx
fabiangosebrink
0
220
Other Decks in Technology
See All in Technology
[AWS Summit Japan 2026]迷っているあなたへ_小さな一歩が、やがて自分を助けてくれる
sh_fk2
1
160
自分が詳しくない領域でAIを使う #プロヒス2026
konifar
13
5.2k
白金鉱業Meetup_Vol.24_「AIエージェントは分けるほど良い」は本当か? / Is it true that “the more you divide AI agents, the better”?
brainpadpr
1
410
20260619 私の日常業務での生成 AI 活用
masaruogura
1
230
2026TECHFRESH畢業分享會 - Lightning Talk - E起 See See : 電商推薦讀心術? 數據說了算
line_developers_tw
PRO
0
1.3k
AIAU_UMEMOGU_ninomiya_slide
ninomiya_ii
0
240
OTel × Datadog で 「AI活用」を計測し、改善に繋げる
shihochan
1
420
フィジカル版Github Onshapeの紹介
shiba_8ro
0
290
新しいUbuntu/GNOMEが使いたいからXからWaylandへ移行頑張ってるの巻 2026-06-20
nobutomurata
0
150
不要なレビューをAIにまかせて AIコーディングの環境改善を加速した
shoota
1
230
【NRUG vol.18】KubernetesにおけるNew Relicデータ取得量削減の考え方
nrug_member
0
170
AIチャット検索改善の3週間
kworkdev
PRO
2
140
Featured
See All Featured
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.5k
The Language of Interfaces
destraynor
162
27k
Heart Work Chapter 1 - Part 1
lfama
PRO
7
36k
The Cost Of JavaScript in 2023
addyosmani
55
10k
Paper Plane (Part 1)
katiecoart
PRO
0
9.1k
Building Adaptive Systems
keathley
44
3.1k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.5k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
170
Facilitating Awesome Meetings
lara
57
7k
Designing Powerful Visuals for Engaging Learning
tmiket
1
420
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
170
Are puppies a ranking factor?
jonoalderson
1
3.6k
Transcript
A -Z Testing
Fabian Gosebrink
None
None
Agenda Exploring the Tools Unit Testing with Angular Integration Testing
with Angular End 2 End Testing with Angular Test Driven Development
Testing
UnitTesting
ShallowTesting
INtegrationTesting
End 2 End Testing
Strategies
SmallesT as Possible
REadable
Do Not Mock...
...That Often
Test Driven
Explore the tools
Explore the tools Protractor Jasmine Karma
Jasmine • Behaviour Driven Development • Fast
None
None
None
Some Jasmine Matchers expect(array).toContain(member); expect(mixed).toBeDefined(); expect(mixed).toBeFalsy(); expect(mixed).toBeNull(); expect(mixed).toBeTruthy(); expect(mixed).toBeUndefined(); expect(mixed).toEqual(mixed);
expect(mixed).toMatch(pattern); expect(number).toBeCloseTo(number, decimalPlaces); expect(number).toBeGreaterThan(number); expect(number).toBeLessThan(number); expect(number).toBeNaN(); expect(spy).toHaveBeenCalled(); expect(spy).toHaveBeenCalledTimes(number); expect(spy).toHaveBeenCalledWith(...arguments);
None
None
Skip Tests
Karma • Test runner • Spawns browser & runs tests
• Also on CommandLine
None
None
Protractor • End-to-end test framework • Runs in a real
browser • Test like a user
Testing
Component.ts
Component.spec.ts
AngularCLI
None
None
None
ARRANGE ACT ASSERT
None
Testing Pipes
None
Testing Services
None
None
None
Testing Services ASYNC
None
None
None
Code...
Testing Routing
None
None
Testing Components
Code...
None
https://github.com/FabianGosebrink/AngularDays-2017 https://offering.solutions https://swissangular.com @FabianGosebrink
Links https://medium.com/google-developer-experts/angular-2-testing-guide-a485b6cb1ef0 https://blog.thoughtram.io/angular/2016/12/27/angular-2-advance-testing-with-custom- matchers.html https://blog.nrwl.io/essential-angular-testing-192315f8be9b https://vsavkin.com/three-ways-to-test-angular-2-components-dcea8e90bd8d https://medium.com/letsboot/angular-end-to-end-testing-c3b9950fdd41 https://developers.livechatinc.com/blog/testing-angular-2-apps-routeroutlet-and-http/ https://jasmine.github.io/edge/introduction.html#section-Included_Matchers