Frontend Testing Training
Level
BeginnerDuration
24h / 3 daysDate
Individually arrangedPrice
Individually arrangedFrontend Testing Training
Frontend testing is crucial as it helps detect bugs and issues before deploying an application to production, ensuring user satisfaction with the interface. Frontend testing tools help developers maintain high code quality and minimize the risk of introducing errors.
Who is this training for?
Frontend developers
Software testers
UI/UX designers
Project managers
What You Will Learn
- This training will help you gain the skills necessary to ensure the quality and reliability of frontend applications and provide a better understanding of the frontend testing process.
Training Program
-
Types of tests – how to choose them and what do they mean?
- Unit tests
- Component tests
- Integration tests
- To test or not to test?
-
What does it mean that code is “testable”?
- Code composition vs. “testability”
- Implementation details vs. contracts vs. side effects
- How to handle third-party code in tests
- Edge cases
- How to avoid “cementing” implementation
-
Structure of a good test
- DRY vs. DAMP vs. WET
- Boundaries
- After* and Before* – how to avoid duplication and complications
- Organization: test suites and test cases
-
Well-chosen assertions
- Loose vs. tighter assertions
- Asymmetric matchers
- Custom matchers
- Circular assertions
-
Mocking and test doubles – mocks, stubs, and spies
- When to use these techniques
- What to mock
- Library support
- Record & Replay pattern
- Pitfalls of mocking
-
Integration tests and MSW
- Where are the boundaries?
- What are the components we integrate?
- How to provide data in tests?
-
Data in tests
- Fixtures – are they always the right way?
- How to generate data
- Snapshots
- Test data sets (data providers) – write one test for many cases
-
Testing techniques
- TDD vs. Code First vs. Test First
-
How to get more from react-testing-library (RTL)?
- Selectors in RTL – byRole etc.
- RTL queries – get vs. find vs. query
- Asynchronous testing with waitFor, act, and find*
- Testing hooks in RTL
- Interactions in RTL – user-event
- Snapshot testing – yay or nay
-
Test Utils – how to extend custom test utilities without creating a mess
- Custom assertions
- Jest matchers
- Utils/Helpers and building abstractions
-
Code coverage
- Types of coverage
- When coverage helps and when it gives a false sense of security
-
Introduction to e2e tests
- Introduction to e2e testing
- Tooling and setup
- e2e testing challenges
-
State management and tests
- What and how to test when using Redux or similar solutions
- Testing code that uses React Context