Intro
We'll check how we can group the test cases to avoid problems with readability and understanding their context.
Prelude
You know very well how grouping and categorization allows us to better find ourselves in the reality around us. It is the same with tests, which we group into functionalities.
Let's group the tests
It's time to look at the tests from a broader perspective. In everyday life, we don't deal solely with teaching a colleague how to make a pizza. We can teach him other things like: cutting with a knife, cooking pasta, driving a car. Each of these topics will have different questions and answers (our tests).
So let's group our functionalities and write the appropriate questions for them.
Loading
Loading
Loading
Loading
You already know what the tests are and how to group them.
Summary
You need to group your tests. Without that they will be hard to maintain and their context will be blurry.
If you enjoyed it, be sure to visit us on Linkedin where we regularly upload content from programming.
- 1. Basics
10 minutes
Software testing
2 m
Grouping the tests
1 minute
The usage of describe and it
2 m
The best practices for naming tests
2 m
Navigating the different types of software tests
3 m
- 2. Mastering unit testing
38 minutes
Project and tests setup
3 m
Unit tests review
4 m
React component testing
5 m
Snapshot testing in React
4 m
Understanding stubs in testing
3 m
Understanding mocks in testing
5 m
Creating testing fixtures
4 m
Using spies in React and Typescript
3 m
Mocking environment variables
3 m
Using dependency injection pattern to improve fixtures
4 m
- 3. Mastering integration testing
12 minutes
Understanding the integration tests
4 m
Using MSW library to remove implementation details from tests
4 m
Creating fixture for MSW to reduce boilerplate and setup
4 m
- 4. Mastering e2e tests
8 minutes
Comments
Add your honest opinion about this article and help us improve the content.