Randomized testing infrastructure (and more!) for JUnit, ANT and Maven

  • All the plumbing for repeatable randomized JUnit tests.
  • Parameterized test suites, test groups, listeners and validators.
  • Advanced thread leak control options and timeouts.
  • ANT task and Maven plugin for running tests concurrently, in isolation.

Inspired by the Apache Lucene project's infrastructure, this project brings a refactored, stand-alone runner for JUnit 4.x tests, which encapsulates built-in repeatable randomized tests, threading and timeout control, parameter factories, thread execution groups and more. Everything is JUnit compatible and will work in your favorite IDE.

On top of that, the project comes with ANT and Maven integration allowing execution of tests in concurrent isolated JVMs, load-balancing and multiple options for reporting, including attractive reports and results visualizations.

Watch an introductory tutorial to randomized testing at Lucene EuroCon 2011.

See junit4 man page here: junit4 documentation.

A short example

60 seconds overview of RandomizedTesting package, what it provides and what it looks like.

Concepts and ideas

A 90 seconds introduction (as opposed to 60 seconds before :) to the concept of randomized testing in general.

Modern junit tests with JUnit4

JUnit4 is an Ant task (and a Maven plugin) for running JUnit4 tests in parallel JVMs on multi-core systems and providing a configurable listener and reporting facilities.