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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Fabian Gosebrink
October 11, 2017
Technology
0
240
Angular Testing von A bis Z
AngularDays 2017 in Berlin - Testing from A to Z
Fabian Gosebrink
October 11, 2017
Tweet
Share
More Decks by Fabian Gosebrink
See All by Fabian Gosebrink
NgRx Signal Store - A Deeper Dive
fabiangosebrink
0
25
Modern Angular Apps in 2026
fabiangosebrink
0
36
Why State is the Most Important Part of Your Angular Application
fabiangosebrink
0
100
Angular testing made easy with Jest and Cypress
fabiangosebrink
0
140
Introducing state management into an application with NgRx
fabiangosebrink
0
210
Scalable architectures in Angular with Nx
fabiangosebrink
0
170
My Biggest Angular Mistakes and How To Avoid Them
fabiangosebrink
0
280
[iJS Munich] Better Angular Architectures with Libraries and Nx
fabiangosebrink
0
170
Mastering State Management in Angular with the NgRx Signal Store
fabiangosebrink
0
440
Other Decks in Technology
See All in Technology
Kiroで見直す開発プロセスとAI-DLC
k_adachi_01
0
100
Mitigating geopolitical risks with local-first software and atproto
ept
0
130
大規模ECサイトのあるバッチのパフォーマンスを改善するために僕たちのチームがしてきたこと
panda_program
1
260
猫でもわかるKiro CLI(AI 駆動開発への道編)
kentapapa
0
270
LINEヤフーにおけるAIOpsの現在地
lycorptech_jp
PRO
4
740
生成AIで速度と品質を両立する、QAエンジニア・開発者連携のAI協調型テストプロセス
shota_kusaba
0
250
会社紹介資料 / Sansan Company Profile
sansan33
PRO
16
410k
Go標準パッケージのI/O処理をながめる
matumoto
0
240
詳解 強化学習 / In-depth Guide to Reinforcement Learning
prinlab
0
330
【社内勉強会】新年度からコーディングエージェントを使いこなす - 構造と制約で引き出すClaude Codeの実践知
nwiizo
2
540
TypeScript 7.0の現在地と備え方
uhyo
7
1.9k
AWS CDK「読めるけど書けない」を脱却するファーストステップ
smt7174
3
200
Featured
See All Featured
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
210
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
74
Utilizing Notion as your number one productivity tool
mfonobong
4
260
A better future with KSS
kneath
240
18k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
5.4k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
280
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.9k
Thoughts on Productivity
jonyablonski
75
5.1k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
62
52k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
410
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.1k
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