Skip to content

Commit f40aa39

Browse files
committed
Add local instructions in tests/README.md
1 parent 356a56a commit f40aa39

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

tests/README.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,48 @@ You can run the tests without running the live database and the live cache tests
108108
./phpunit --exclude-group DatabaseLive --exclude-group CacheLive
109109
```
110110

111+
## Verifying Random Test Execution Order
112+
113+
To help detect hidden test inter-dependencies, you can run component tests in random order using:
114+
115+
```console
116+
.github/scripts/run-random-tests.sh
117+
```
118+
119+
This script reads enabled components from `.github/scripts/random-tests-config.txt` and runs each
120+
component under `tests/system/` with PHPUnit random ordering.
121+
122+
Common examples:
123+
124+
```console
125+
# Run all configured components once
126+
.github/scripts/run-random-tests.sh
127+
128+
# Run all configured components 10 times
129+
.github/scripts/run-random-tests.sh --repeat 10
130+
131+
# Run one component 10 times
132+
.github/scripts/run-random-tests.sh --component CLI --repeat 10
133+
134+
# Limit parallel jobs and suppress debug lines
135+
.github/scripts/run-random-tests.sh --max-jobs 4 --quiet
136+
```
137+
138+
Short-option equivalents:
139+
140+
```console
141+
# Run all configured components 10 times
142+
.github/scripts/run-random-tests.sh -r 10
143+
144+
# Run one component 10 times
145+
.github/scripts/run-random-tests.sh -c CLI -r 10
146+
147+
# Limit parallel jobs and suppress debug lines
148+
.github/scripts/run-random-tests.sh -n 4 -q
149+
```
150+
151+
Failure diagnostics and execution-order logs are written to `build/random-tests/`.
152+
111153
## Generating Code Coverage
112154

113155
The coverage reports are generated by default after the execution of tests. These reports

0 commit comments

Comments
 (0)