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
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
Why State Is the Most Important Part of Your Angular Application
fabiangosebrink
0
45
Scalable Angular Architectures with Route-Based Architecture
fabiangosebrink
0
36
Advanced Signal Store: Structuring State for Real Angular Applications
fabiangosebrink
0
130
NgRx Signal Store - A Deeper Dive
fabiangosebrink
0
85
Modern Angular Apps in 2026
fabiangosebrink
0
150
Why State is the Most Important Part of Your Angular Application
fabiangosebrink
0
170
Angular testing made easy with Jest and Cypress
fabiangosebrink
0
190
Introducing state management into an application with NgRx
fabiangosebrink
0
280
Scalable architectures in Angular with Nx
fabiangosebrink
0
280
Other Decks in Technology
See All in Technology
Rust で関数型ドメインモデリング
takonda
0
140
SAENM ~Jupyterで残すPoCの試行錯誤、未来の自分と仲間を助ける記録!~
terapyon
0
110
DGX Spark でどこまでハッキングができるのか?
kash1064
3
1.3k
AIにシークレットを見せない、WSL2で安全な開発環境
yazm
0
300
無理せず続ける、子育てエンジニアの学び
codmoninc
PRO
0
870
QA4AI 2026-Oct 生成AI時代の品質保証
tokuty
1
860
PHPカンファレンス関西の招待状 / Invitation to PHP Conference Kansai
ykanoh
0
110
自作バイナリを動かす「入口」8選
puhitaku
2
1.3k
Metadata - Section 1: HTML Basics
mohab1
0
120
夫婦で子育てするための育児標準化
codmoninc
PRO
0
340
Running Kotlin + Quarkus with Lambda
nealle
1
3.7k
Getting Started with Google Antigravity
glaforge
0
300
Featured
See All Featured
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
370
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
500
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.8k
Claude Code のすすめ
schroneko
67
230k
So, you think you're a good person
axbom
PRO
2
2.2k
How to Ace a Technical Interview
jacobian
280
24k
Documentation Writing (for coders)
carmenintech
77
5.6k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.4k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
300
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.8k
Into the Great Unknown - MozCon
thekraken
41
2.8k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
22k
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