Skip to content
Snippets Groups Projects
Commit fa6ef1ad authored by Dylan Griffith's avatar Dylan Griffith
Browse files

Document rspec_check_order_dependence in flaky specs docs

I discovered by asking around that there is another tool documented at
https://docs.gitlab.com/ee/development/testing_guide/best_practices.html#test-order
for dealing with ordering issues. The `rspec_bisect_flaky` is actually
broken for most people at the moment due to some OSX issue which is
being discussed in this
[Slack thread (internal)](https://gitlab.slack.com/archives/C2Z9A056E/p1727723530427539)
.

In order to help people with debugging these flaky specs I thought I
should also document this other useful tool.
parent 8c64e757
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -338,7 +338,14 @@ These flaky tests can fail depending on the order they run with other tests. For
 
- <https://gitlab.com/gitlab-org/gitlab/-/issues/327668>
 
To identify the tests that lead to such failure, we can use `scripts/rspec_bisect_flaky`,
To identify test ordering issues in a single file you can run
`scripts/rspec_check_order_dependence`:
```shell
scripts/rspec_check_order_dependence spec/models/project_spec.rb
```
To identify the ordering issues across different files, you can use `scripts/rspec_bisect_flaky`,
which would give us the minimal test combination to reproduce the failure:
 
1. First obtain the list of specs that ran before the flaky test. You can search
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment