any update on managed fault injection in testapi?

there is an issue with fault injection api in the latest testapi version (0.6). unfortunately the testapi project on codeplex doesn't seem to be actively maintained any more. so i'm working on creating an new project on codeplex for managed fault injeciton only. the new project will have full functionality instead of the current limited version.

before the new project goes live, please use testapi 0.5 version for fault injeciton.

Comments (1)
  1. kannan says:

    I first tried with 0.6 and it did not inject code, then I read this blog post, and tried 0.5, and still it doesn't inject the fault. This is my code:

    using System;

    using System.Collections.Generic;

    using System.Linq;

    using System.Text;

    using System.Threading.Tasks;

    using System.Diagnostics;

    using Microsoft.Test.FaultInjection;

    namespace MFI


       class Program


           static void Main(string[] args)


               string method = "Microsoft.ApplicationServer.Integration.Pipelines.B2B.AS2.Decoder.Execute(Microsoft.BizTalk.Component.Interop.IPipelineContext,Microsoft.BizTalk.Message.Interop.IBaseMessage,out Microsoft.ApplicationServer.Integration.Pipelines.B2B.Tracking.AS2MessageTrackRecord,out Microsoft.ApplicationServer.Integration.Pipelines.B2B.Tracking.AS2MdnTrackRecord,out bool)";

               ICondition condition = BuiltInConditions.TriggerOnEveryCall;

               IFault fault = BuiltInFaults.ThrowExceptionRuntimeFault("die");

               FaultRule rule = new FaultRule(method, condition, fault);

               FaultSession session = new FaultSession(rule);


               // Run your test automation here

               Console.WriteLine("press any key to exit….");





Comments are closed.

Skip to main content