Altinn / Altinn/app-frontend-react
Investigate fuzzy cypress tests using `responseFuzzing`
- Dominant language
- TypeScript
- Stars
- 21
- Forks
- 33
- Avg merge
- 6d 23h
- Merged PRs (30d)
- 3
Description
Some cypress tests can be provoked to fail in if API responses are artificially delayed by a random amount of time (usually this is caused by race conditions in code which assumes that one request always returns before another, and `LastRequestFulfulled` being dispatched before `FirstRequestFulfilled` causes unanticipated state changes). More details and discussions around this concept in #367.
Response fuzzing can be enabled when running the Cypress tests by using a command like:
```shell
npx cypress run --browser chrome --env environment=local,responseFuzzing=on --config retries=0
```
It is important not to let Cypress retry failing tests here, as the whole point is to find and isolate these unstable tests. When the remaining race conditions have been triaged and fixed, we should also enable a nightly run using fuzzing on the `main` branch.
Contributor guide
Research direction
Read the discussion in issue #367, then run the Cypress suite with responseFuzzing enabled and retries disabled using the command shown. Identify and isolate tests that fail under delayed API responses, triage or fix the remaining race conditions, and verify that the suite is stable before considering a nightly fuzzing run on main.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cypress, typescript
- Domain
- ci-cd, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100