KTH Logo

KTH Royal Institute of Technology
School of Computer Science and Communication

Enforcer: Fault injection for Java/JUnit


Enforcer tests exception handlers in Java for you.

In a typical test suite, many possible exceptions (such as for input/output) are not covered. Each method call that may throw exceptions may have an effect on the program, but systematic testing of this is hard. Enforcer will run all JUnit-based unit tests, analyze exception coverage, and re-run an instrumented version of your program which automatically tests all exceptions. Step by step, Enforcer generates exceptions at different code locations. This forces execution to go through previously uncovered exceptions. By analyzing the unit test structure first, Enforcer is much more efficient than other fault injection tools. Read more... (manual.pdf)


enforcer-1.0.tar.gz Source distribution (version 1.0, includes all files)
enforcer-1.0.jar Binary distribution (version 1.0, requires serp.jar and junit3.8.1.jar)
serp.jar SERP, required to run Enforcer
junit3.8.1.jar JUnit version 3.8.1, required to run Enforcer
LICENSE License: New BSD License
README README: Short documentation
manual.pdf Manual: Getting started with Enforcer

Publications about Enforcer

Click on the number for the bibtex entry.

[3] C. Artho, A. Biere, S. Honiden. Exhaustive Testing of Exception Handlers with Enforcer. FMCO 2006 post-proceedings, LNCS 4709. PDF | Postscript (gzipped)
[2] C. Artho, A. Biere, S. Honiden. Enforcer -- Efficient Failure Injection. FM 2006, Hamilton, Canada, August 2006. PDF | Postscript (gzipped)
[1] C. Artho, A. Biere, S. Honiden. Testing I/O Failures with Enforcer. FM 2006 (tool demonstration track), Hamilton, Canada, August 2006. PDF | Postscript (gzipped)

E-mail: artho (at) kth (dot) se

Last update: September 8, 2016: This site is now hosted at KTH.

KTH Logo