Welcome to the IMUnit (pronounced "immunity") project homepage. IMUnit is a framework for writing and executing multithreaded unit tests. A multithreaded test exercises the code under test with two or more threads. Each test execution follows some schedule/interleaving of the multiple threads, and different schedules can give different results. IMUnit enables explicit and modular specification of schedules as orderings on events encountered during test execution. IMUnit also provides a tool that automatically enforces test execution to follow the specified schedules. Contrasted to the currently dominant sleep-based tests, IMUnit tests are more intuitive, do not have false positives or negatives, and can also run substantially faster.
By Vilas Jagannath,
Milos Gligoric,
Dongyun Jin,
Qingzhou Luo,
Grigore Rosu, and
Darko Marinov.
8th joint meeting of the European Software Engineering Conference and the ACM SIGSOFT Symposium on the Foundations of Software Engineering
(ESEC/FSE 2011), pages 223-233, Szeged, Hungary, Sept. 2011
By Vilas Jagannath,
Milos Gligoric,
Dongyun Jin,
Grigore Rosu, and
Darko Marinov.
Third International Workshop on Multicore Software Engineering
(IWMSE 2010), pages 48-49, Cape Town, South Africa, May 2010
IMUnit is compatible with JUnit 4. All you need to compile and execute IMUnit tests is the latest imunit.jar on the classpath.
You can also take a look at the source code and javadoc for IMUnit.
You can see in the imunit-tests project many examples of IMUnit tests that we obtained by translating existing sleep-based tests from various open-source projects (as described in our ESEC/FSE 2011 paper).
Can be found here.