b. Selected mocking, without DOM interaction c. Selected mocking, DOM interaction d. Most minimal mocking, DOM Interaction 2. Exotic a. RxJs Marbles b. Visual Regression c. Component Tests via Storybook/Cypress (E2E) Different Testing Techniques
◦ Very tightly coupled to implementation • Advantages ◦ Great code quality (FP) ◦ Perfect fit for edge cases / finding bugs ◦ Fast • Disadvantages ◦ Lots of code for mocking ◦ Refactoring not really possible Integration Tests • Mock out-of-system dependencies ◦ Run against an API (UI) • Advantages ◦ Great for refactoring ◦ Efficient (coverage) • Disadvantages ◦ Big setup required ◦ Slow
applied? ◦ Too much mocking ◦ Do I need unit tests for everything? ▪ AngularCLI generated spec files • Integration Tests ◦ Too much setup required → feels like E2E ◦ What should I mock / What is my entry point?
type ◦ One testing technique per Type • Integration Tests ◦ Reduction of dependencies via domain/feature boundaries ◦ Integration Test per Domain/Feature ◦ Entry point is the feature component
b. Selected mocking, without DOM interaction c. Selected mocking, DOM interaction d. Most minimal mocking, DOM Interaction 2. Exotic a. RxJs Marbles b. Visual Regression c. Component Tests via Storybook/Cypress (E2E) Edge Cases: Testing Techniques
b. Selected mocking, without DOM interaction c. Selected mocking, DOM interaction d. Most minimal mocking, DOM Interaction 2. Exotic a. RxJs Marbles b. Visual Regression c. Component Tests via Storybook/Cypress (E2E) Modules: Testing Techniques
b. Selected mocking, without DOM interaction c. Selected mocking, DOM interaction d. Most minimal mocking, DOM Interaction 2. Exotic a. RxJs Marbles b. Visual Regression c. Component Tests via Storybook/Cypress (E2E) Sweet Spot: Testing Techniques
the edge cases for Unit Tests with full mocking • Cover what's left with "Modules" Tests • Apply the right techniques: ◦ Visual Regression: Presentational Components ◦ RxJs Marbles: ngRx Effect ◦ Storybook/Cypress: Component Groups
• 28. & 29. October (English) • 6. & 7. December (English) Cooperation with Angular Academy • 15. September - 17. September • 29. September - 1. October
• Wiener Schnitzel: https://pixabay.com/get/gcb51eeba20917a5033792cd225f69146ce3ca04e07ecdabefbe0014c3280c5237b7ac2050244c38855e83408e24c0b9f_1920.jpg • Kaiserschmarrn: https://upload.wikimedia.org/wikipedia/commons/thumb/4/4f/2015_0731_Kaiserschmarrn_Apfelso%C3%9Fe_Edelweissh%C3%BCtte_S%C3%B6lden.jpg/960px-2015_0731_Kai serschmarrn_Apfelso%C3%9Fe_Edelweissh%C3%BCtte_S%C3%B6lden.jpg • Sacher Torte: https://upload.wikimedia.org/wikipedia/commons/thumb/f/fa/Original_Sacher-Torte_%C2%A9Hotel_Sacher.jpg/1024px-Original_Sacher-Torte_%C2%A9Hotel_Sacher.jpg • No Kangaroos in Austria: https://ih1.redbubble.net/image.467145234.1731/bg,f8f8f8-flat,750x,075,f-pad,750x1000,f8f8f8.u5.jpg • Sound of Music Cover: https://www.rottentomatoes.com/m/sound_of_music