Fault injection for .NET apps?

前端 未结 4 881
青春惊慌失措
青春惊慌失措 2020-12-31 06:20

I am wondering if anyone knows of tools or techniques to automatically inject common faults into a running .NET program. Stuff like...

  • Randomly inject an OutO
4条回答
  •  清酒与你
    2020-12-31 06:49

    There is a codeplex project called TestAPI that can do runtime fault injection. You need to look at its managed code fault injection API. It uses the CLR profiling API to intercept method calls at runtime and modify their behaviour.

    Have a look at an example to see how to inject an exception on a method call in an already compiled exe.

提交回复
热议问题