Skip to content

Commit

Permalink
update guidelines to avoid redundant tests
Browse files Browse the repository at this point in the history
  • Loading branch information
OlimpiaZurek committed Oct 29, 2024
1 parent f1b87c8 commit 703f337
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions contributingGuides/REASSURE_PERFORMANCE_TEST.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ We use Reassure for monitoring performance regression. It helps us check if our

## Performance Testing Strategy (`measureRenders`)

- Before adding new tests, check if the proposed scenario or component is already covered in existing tests. Duplicate tests can slow down the CI suite, making it harder to spot meaningful regressions.
- Review the current test suite to ensure your test scenario or component isn’t already being tested elsewhere.
- Test only scenarios that cover new or unique interactions. Avoid testing repetitive user actions that could be captured within a single, comprehensive scenario.
- Where applicable, use utility functions and helper methods to consolidate common actions (e.g., data mocking, scenario setup) across tests. This reduces redundancy and allows tests to be more focused and reusable.
- The primary focus is on testing business cases rather than small, reusable parts that typically don't introduce regressions, although some tests in that area are still necessary.
- To achieve this goal, it's recommended to stay relatively high up in the React tree, targeting whole screens to recreate real-life scenarios that users may encounter.
- For example, consider scenarios where an additional `useMemo` call could impact performance negatively.
Expand Down

0 comments on commit 703f337

Please sign in to comment.