v0.6, Notes regarding how to get the sample work.

Feb 22, 2011 at 7:50 AM

Hello, thank you for releasing v0.6!

Several notes regarding NUnit sample:

1.    There is a mention that you moved to VS2010, but NUnit sample is in VS 2008 format;
2.    The solution is not compliable right out-of-the-box – TestApiCore and TestApiWpf are referenced through GAC, not as through relative path;
3.    References to FaultInjectionEngine DLLs are broken also;
4.    After re-referencing TestApi DLLs and removing references to FaultInjectionEngine I got:

Error    1    Using the generic type 'System.Collections.Generic.ObjectComparer<T>' requires '1' type arguments   
in ObjectComparisonTests.cs.

5.    After commenting ObjectComparisonTests.cs the build was successful;
6.    However, running VerifyWindowAppearance() from VisualVerificationTests entailed

VisualVerificationTests.VerifyWindowAppearance:
System.InvalidOperationException : No process is associated with this object.

Note – the SampleApp was launched;
7.    The solution was to replace

string sampleAppPath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().CodeBase), "SampleApp.exe");
with

string sampleAppPath = @"SampleApp.exe";

Environment:
Win XP SP3/VS2008-2010/NUnit 2.5.0

Above comments are not a big deal as for me, but it may be confusing for newcomers.

Thank you again for the great tool!

Hello, thank you for releasing v0.6!

Several notes regarding NUnit sample:

<!-- [if !supportLists]-->1.       <!-- [endif]-->There is a mention that you moved to VS2010, but NUnit sample is in VS 2008 format;

<!-- [if !supportLists]-->2.       <!-- [endif]-->The solution is not compliable right out-of-the-box – TestApiCore and TestApiWpf are referenced through GAC, not as through relative path;

<!-- [if !supportLists]-->3.       <!-- [endif]-->References to FaultInjectionEngine DLLs are broken also;

<!-- [if !supportLists]-->4.       <!-- [endif]-->After re-referencing TestApi DLLs and removing references to FaultInjectionEngine I got:

Error              1              Using the generic type 'System.Collections.Generic.ObjectComparer<T>' requires '1' type arguments 

in ObjectComparisonTests.cs.

<!-- [if !supportLists]-->5.       <!-- [endif]-->After commenting ObjectComparisonTests.cs the build was successful;

<!-- [if !supportLists]-->6.       <!-- [endif]-->However, running VerifyWindowAppearance() from VisualVerificationTests entailed

VisualVerificationTests.VerifyWindowAppearance:

System.InvalidOperationException : No process is associated with this object.

Note – the SampleApp was launched.

<!-- [if !supportLists]-->7.       <!-- [endif]-->The solution was to replace

string sampleAppPath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().CodeBase), "SampleApp.exe");

with

string sampleAppPath = @"SampleApp.exe";

 

Environment:

Win XP SP3/VS2008-2010/NUnit 2.5.0

 

Above comments are not a big deal as for me, but it may be confusing for newcomers.

 

Thank you again for the great tool!

Feb 23, 2011 at 6:58 PM

NLord,

You are right, we mistakenly did not update the NUnit sample. Thanks for catching and reporting this (we should have caught it ourselves). A fix will be coming shortly (under CR currently)

Ivo

 

Feb 23, 2011 at 8:10 PM

NLord,

 

Thank you for reporting the issues! Fixes for items #1, 2 and 5 are checked in. The rest will be fixed shortly.

 

Thanks!

Andrey

Mar 1, 2011 at 8:11 PM

Hello,

 

I downloaded the TestApi 0.6 package, and can't get the FaultInjection sample to work.

No matter what I try, the call isn't intercepted.

 

Can you tell me if it works for you?

 

Yitzhak.

Mar 1, 2011 at 8:19 PM

Bill, Can you help?

Thanks

From: yitzhaks [email removed]
Sent: Tuesday, March 01, 2011 12:11 PM
To: Ivo Manolov
Subject: Re: v0.6, Notes regarding how to get the sample work. [TestApi:247025]

From: yitzhaks

Hello,

I downloaded the TestApi 0.6 package, and can't get the FaultInjection sample to work.

No matter what I try, the call isn't intercepted.

Can you tell me if it works for you?

Yitzhak.

Mar 3, 2011 at 7:16 AM

hi yitzhaks, can you proivde more info? for example:

1. is it working for you on previous release v0.5?

2. your os version and  bitness (32 or 64)

3. check my blog to see any known issue: http://blogs.msdn.com/b/billliu/archive/2010/05/27/if-it-still-not-working.aspx

 

Mar 3, 2011 at 5:52 PM

Perfect – thank you Bill

From: Bill Liu
Sent: Thursday, March 03, 2011 9:43 AM
To: Ivo Manolov; TestApi@discussions.codeplex.com
Subject: RE: v0.6, Notes regarding how to get the sample work. [TestApi:247025]

Replied online. Thanks

Bill

From: Ivo Manolov
Sent: Tuesday, March 01, 2011 12:19 PM
To: TestApi@discussions.codeplex.com; Bill Liu
Subject: RE: v0.6, Notes regarding how to get the sample work. [TestApi:247025]

Bill, Can you help?

Thanks

From: yitzhaks [email removed]
Sent: Tuesday, March 01, 2011 12:11 PM
To: Ivo Manolov
Subject: Re: v0.6, Notes regarding how to get the sample work. [TestApi:247025]

From: yitzhaks

Hello,

I downloaded the TestApi 0.6 package, and can't get the FaultInjection sample to work.

No matter what I try, the call isn't intercepted.

Can you tell me if it works for you?

Yitzhak.

Mar 9, 2011 at 12:58 PM
Edited Mar 9, 2011 at 1:24 PM
billliu wrote:

hi yitzhaks, can you proivde more info? for example:

1. is it working for you on previous release v0.5?

2. your os version and  bitness (32 or 64)

3. check my blog to see any known issue: http://blogs.msdn.com/b/billliu/archive/2010/05/27/if-it-still-not-working.aspx

 

Hi Bill,

1. I never had 0.5.

2. Windows 7 Enterprise x64.

3. I tried all the known issues.

 

I think I found the line in the log with the error message:

CLR Error:Failed to emit method-ref token for [TestApiCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=3d18d97752fc57cc, processorArchitecture=MSIL]Microsoft.Test.FaultInjection.FaultDispatcher.Trap(...)

Does this make any sense to you?

Apr 24, 2011 at 11:43 AM

Hi,

 

I get exactly the same error message on a Windows XP SP3 machine when running the sample app posted by Ivo Manolov at at http://blogs.msdn.com/b/ivo_manolov/archive/2009/11/25/9928447.aspx.

 

I also tried running the app on a Windows Server 2008 without luck. There I don't get any error message, the fault injection simply doesn't work.

 

On the XP machine, I tried all the following without luck:

- set COMPLUS_ProfAPI_ProfilerCompatibilitySetting=EnableV2Profiler

- Uninstalled .NET framework 4.0

- Re-compiled the sample apps in x86 mode (instead of Any CPU).

 

Any clues?

May 11, 2011 at 10:07 AM
Edited May 11, 2011 at 10:30 AM

Hi

I have tried to run the Fault injection samples at these sites:

http://msdn.microsoft.com/en-us/magazine/ff898404.aspx

and

http://blogs.msdn.com/b/ivo_manolov/archive/2009/11/25/9928447.aspx

Both these samples work for me when run on a Win 7 + Visual Studio 2008 running .net 3.5.

In both the sample programs the Test API version used is 4.

When I try to follow the same steps using TestAPI version 6, it doesnt work(no errors, but just doesnt work)

 

Also,

when I run the sample tests on a Win XP SP3 + Visual Studio 2010 running .net 4, they simply don't work.

I am getting the same error in the log file as yitzhaks and jhrecife posts...

ERROR(151C:0BC0) : CLR Error:Failed to emit method-ref token for [TestApiCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=3d18d97752fc57cc, processorArchitecture=MSIL]Microsoft.Test.FaultInjection.FaultDispatcher.Trap(...)

 

Please help .

PS: 1) Some strange thing i noticed in Win7 is that the fault injection doesnt work if the project is compiled in locations inside Users/Documents/VS projects etc.

But runs when kept in a simple folder in root like C:\project\fault injection.

 

May 12, 2011 at 9:47 PM

Hello,

Sorry for the delay. We will look into the reported issue and get back to you.

Thanks for the reports:
Ivo

May 17, 2011 at 7:19 AM

we identified that there is an issue with fault injection api in the new testapi 0.6 version. while we are working on the fix, please use previous version (v0.5), which worked fine.

note: if you already use or registed 0.6 faultinjectionengine.dll, please use the following command to clean it up before use v0.5.

                         in command window (run as adminsitrator), goes to folder having faultinjectionengine.dll and run: regsvr32 -u faultinjectionengine.dll

then you should good to go.

 

 

May 19, 2011 at 8:21 AM

thanks .. the version 5 is working fine...

Sep 14, 2011 at 8:33 PM

Hello,

I was wondering if the fault injector should be working correctly in version .6 now?  I have been trying to get a small test application running without success.  I see the same error that Kurpa 007 mentioned on May 11.  I tried to get version .5 to work but I am getting the same error.

 

Setup Information:

Windows 7 64 bit

Both the same console app and the console test harness are running as x86 on .Net 4.0

I placed FaultInjectionEngine.dll, TestApiCore.dll, TestApiWpf.dll, atl90.dll, msvcm90d.dll, msvcp90d.dll, msvcr90d.dll, xUnit.dll and xUnit.Extensions.dll, the FaultInjectionEngine exp/ilk/lib files, and the program I want to inject the error into all in the debug folder where VS lays down the test harness exe

 

Thank you for any information,

Justin

Sep 14, 2011 at 10:37 PM

hi Creetor, please make sure your sample console app compiled to x64 or ANYCPU when your os is 64bit.

Sep 15, 2011 at 1:53 PM

Thank you! I can’t believe I missed that. Version .5 will work. Will we need to wait for version .7 before updating for Fault Injection?

Sep 15, 2011 at 10:19 PM

checking with project owner on the update schedule.