Repository navigation
Add seeded test order randomization - #3458
q36zhd46w17o wants to merge 1 commit into
Conversation
|
Prepared with Codex a small portability follow-up against this exact head The current per-file salt includes the absolute filename. This follow-up uses the project-relative path and forwards The new actual CLI regression fails on the unchanged head and passes across checkout roots in both worker-thread and child-process modes. Patched portability, runner and assorted CLI tests pass all 131 assertions on Node 24.19.0/Linux. XO and TypeScript checks pass, with 10 existing lint warnings. The patch is +78/-4 across five files and also applies cleanly to #3463 at |
Summary
This adds opt-in randomized test ordering with reproducible seeds:
--randomizeshuffles test file order and concurrent tests within each file, generating and reporting a seed for the run.--seed=<value>enables the same randomization using a reproducible seed..serialtests and--serialexecution continue to run in declaration order.Fixes #595.
Validation
npx tap test-tap/runner.jsnpx tap test-tap/integration/assorted.jsnpx xonpx tsc --noEmitenv AVA_FAKE_SCM_ROOT=.fake-root AVA_FORCE_CI=ci node ../../entrypoints/cli.js --tap --seed=ava-seed randomize-tests/test.jsnpm testnpm testcompleted with the self-hosted AVA suite passing 210 tests with 4 skips, and the TAP suite passing 1633 tests.Bounty
This is for the IssueHunt-funded #595 bounty. The implementation covers the requested random ordering, reproducible seed, and reported seed behavior.
IssueHunt Summary
Referenced issues
This pull request has been submitted to: