Skip to content

KurtWeston/test-shuffle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

test-shuffle

Randomize test execution order to detect hidden dependencies and flaky tests

Features

  • Wrap Jest, Mocha, or Vitest test runners with randomized execution order
  • Seeded randomization for reproducible test runs using --seed flag
  • Detect tests that fail only in specific execution orders
  • Multiple shuffle strategies: full random, per-suite, per-file
  • Report suspected test dependencies when failures occur only in certain orders
  • CI-friendly exit codes (0 for pass, 1 for fail)
  • JSON output mode for programmatic consumption
  • Save and replay specific shuffle orders that exposed failures
  • Colored terminal output showing test order and results
  • Support for test filtering and pattern matching

How to Use

Use this project when you need to:

  • Quickly solve problems related to test-shuffle
  • Integrate typescript functionality into your workflow
  • Learn how typescript handles common patterns

Installation

# Clone the repository
git clone https://github.com/KurtWeston/test-shuffle.git
cd test-shuffle

# Install dependencies
npm install

Usage

npm start

Built With

  • typescript

Dependencies

  • commander
  • chalk
  • seedrandom

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Randomize test execution order to detect hidden dependencies and flaky tests

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors