Byte-Monkey: Fault injection for the JVM
probablyfine.co.uk
probablyfine.co.uk
Fault: Throw exceptions from methods that declare those exceptions
Latency: Introduce latency on method-calls
Nullify: Replace the first non-primitive argument to the method with null
The first two seem useful. The last maybe less useful depending on how you design your project. For example, I commonly disallow null to be passed as a method parameter for internal methods. External APIs will null-check, but all internal logic expects to never be passed null. Still might be useful since you can restrict the scope of it's instrumentation on a package level.I'm looking for more failure modes to add, so if you can think of any more send them my way!
Perhaps looking at the kinds of transformations that mutation testing frameworks perform would be informative?
- Throw OutOfMemoryException randomly
Nullify looks more interesting as a general code reliability check tool specially with the @NotNull thing another commenter mentioned.
Kudos to you op for making this work. Great job! I might give this a try some time soon.