Eğitim Hakkında
Digital Vizyon Akademi'nin Advanced Testing Angular Eğitiminde Birim Testleri, Bileşen Testleri ve Uçtan Uca (E2E) testleri konularını öğreneceksiniz.
Neler Öğreneceksiniz
- Learn synchronous and asynchronous testing with Angular components, pipes, and services
- Write component and DOM tests
- Configure Jasmine to behave the way you want
- Perform integration testing, including use of spies and mocks
Eğitim İçeriği
PART 1: UNIT TESTS
Unit tests with Jest
- Jasmine vs. Jest
- Test Coverage
- Extending Jest
- Asynchronicity
- fakeAsync vs. waitForAsync
- Mocking: jest.mock, jest.fn, jest.spyOn
- Stubbing
Testing of reactivity
- RxJS Marbles for pipe operators
- Use of RxJS Marbles in normal unit tests
- Unit tests for NGRX
PART 2: COMPONENT & INTEGRATION TESTS
Component Tests
- TestBed and Dependency Injection
- DOM interaction
- Change detection
- Component Snapshots
Advanced component tests
- Nested components
- Testing @Input and @Output
- Testing directives and pipes
- Factory methods for reducing boilerplate code
- Spectator
- Testing Library
- Harnesses
- Reuse harnesses
Integration tests
- HttpTestingController
- RouterTestingModule
- NgRx and the MockStore
Best Practices
- Two approaches: London & Detroit
- Test strategies: when should I use what?
- Testable architecture
PART 3: END-TO-END TESTS WITH CYPRESS & VISUAL REGRESSION
Visual regression with storybook
- Multiple Jest configurations
- Puppeteer
- Storybook
- StoryShots
Cypress
- Overview of existing E2E frameworks
- Difference between Web-Driver and Chrome DevTools protocol
- Cypress and its “awaiting” feature
- The cy object
- Implicit and explicit assertions
Cypress Advanced
- Page Object Models
- cy expand object
- Avoid Flaky Tests
- Mocking of HTTP requests
- Reuse Angular Harnesses
Cypress and Beyond
- Optimal test design
- Conditional tests
- Direct communication with the backend
- Unit tests in connection with Storybook
- Unit tests with Component Test Runner
- Test Coverage