by jdbernard · 10y ago · 0 comments
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