Skip to content

Add --shuffle option to PonyTest#224

Merged
SeanTAllen merged 1 commit into
mainfrom
shuffle-test-ordering
Mar 26, 2026
Merged

Add --shuffle option to PonyTest#224
SeanTAllen merged 1 commit into
mainfrom
shuffle-test-ordering

Conversation

@SeanTAllen

Copy link
Copy Markdown
Member

Proposes a --shuffle flag for PonyTest that randomizes test execution order to detect hidden test coupling. Accepts an optional U64 seed for reproducible orderings.

Applies to all scheduling modes: sequential (the primary use case for CI environments already using --sequential), concurrent (randomizes dispatch order), and within exclusion groups.

Uses Time.cycles() for seed generation and the existing Random.shuffle (Fisher-Yates) for the shuffle itself. Implementation buffers (_TestRunner, _Group) pairs and shuffles before dispatch, requiring no changes to the group implementations.

Proposes a --shuffle flag that randomizes test execution order to
detect hidden test coupling. Applies to sequential, concurrent,
and exclusion group scheduling modes. Uses an optional seed for
reproducible orderings.
@ponylang-main ponylang-main added status - new The RFC is new and ready for discussion. discuss during sync Should be discussed during an upcoming sync labels Mar 17, 2026
@SeanTAllen SeanTAllen added status - final comment period The RFC is finalized. Waiting for final comments. and removed status - new The RFC is new and ready for discussion. labels Mar 18, 2026
@SeanTAllen

Copy link
Copy Markdown
Member Author

This was accepted. I will merge and do the shuffle to get it into the stdlib.

@SeanTAllen SeanTAllen removed status - final comment period The RFC is finalized. Waiting for final comments. discuss during sync Should be discussed during an upcoming sync labels Mar 25, 2026
@ponylang-main ponylang-main added the discuss during sync Should be discussed during an upcoming sync label Mar 25, 2026
@SeanTAllen
SeanTAllen merged commit 8416fec into main Mar 26, 2026
10 checks passed
@SeanTAllen
SeanTAllen deleted the shuffle-test-ordering branch March 26, 2026 23:39
@ponylang-main ponylang-main removed the discuss during sync Should be discussed during an upcoming sync label Mar 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants