Problems with TestDriven.NET in Visual Studio 2008 SP1

111 views
Skip to first unread message

Richard M

unread,
Sep 12, 2008, 10:08:24 AM9/12/08
to TestDriven.NET Users
I've run into some problems with TestDriven.NET after upgrading to
SP1. Now when I right click on a test to run it the status bar simply
says "0 Passed, 0 Failed, 0 Skipped". I've tried updating to the
latest (2.13.2184) but it still is happening.

There is one other thing I can think of that it might be. I am still
using 2.4.6 for the nunit assembly in my tests as it is a big project
and it's a bad time for changes of that type. However, I tried
replacing the files in the NUnit\2.4 directory with the 2.4.6 files
and it didn't help.

Any Ideas?

Thanks,
-Rick

Jamie Cansdale

unread,
Sep 12, 2008, 11:23:52 AM9/12/08
to TestDri...@googlegroups.com
Hi Richard,

It is possible that installing Visual Studio 2008 SP1 has updated your
assembly search path. Please check that your test assembly is compiled
against the 'nunit.framework' version you expect (e.g using .NET
Reflector). I usually include 'nunit.framework.dll' in my test project
to ensure that a specific version is always used.

> However, I tried replacing the files in the NUnit\2.4 directory with the
> 2.4.6 files and it didn't help.
>

TestDriven.Net should work fine with 'nunit.framework' 2.4.6 and
below. There is an adapter in the NUnit\2.4 directory that is compiled
against a specific version of NUnit. If you update the NUnit files,
you will likely break TestDriven.Net.

Try reinstalling TestDriven.Net, including 'nunit.framework.dll' in
your test project, recompiling and then see if it works.

Regards,
Jamie.

--
http://www.testdriven.net
http://weblogs.asp.net/nunitaddin

Richard M

unread,
Sep 15, 2008, 10:29:24 AM9/15/08
to TestDriven.NET Users
Hi Jamie,

By include do you mean to have in your references? The
nunit.framework.dll assembly is already referenced in all of my test
projects. Because I work in a team environment, I do not have control
over the version of nunit.framework.dll that is referenced by my
projects. It must be 2.4.6.

I have also tried uninstalling and then reinstalling the latest
version of TestDriven.NET numerous five times doing a full uninstall
reboot and install. Tossing the 2.4.6 files into the 2.4 directory was
just an experiment and I promptly replaced the old files after and
have sense reinstalled. I'm not sure what else to do at this point.

Thanks for taking the time to respond.
-Rick


On Sep 12, 11:23 am, "Jamie Cansdale" <jcansd...@gmail.com> wrote:
> Hi Richard,
>
> It is possible that installing Visual Studio 2008 SP1 has updated your
> assembly search path. Please check that your test assembly is compiled
> against the 'nunit.framework' version you expect (e.g using .NET
> Reflector). I usually include 'nunit.framework.dll' in my test project
> to ensure that a specific version is always used.
>
> > However, I tried replacing the files in the NUnit\2.4 directory with the
> > 2.4.6 files and it didn't help.
>
> TestDriven.Net should work fine with 'nunit.framework' 2.4.6 and
> below. There is an adapter in the NUnit\2.4 directory that is compiled
> against a specific version of NUnit. If you update the NUnit files,
> you will likely break TestDriven.Net.
>
> Try reinstalling TestDriven.Net, including 'nunit.framework.dll' in
> your test project, recompiling and then see if it works.
>
> Regards,
> Jamie.
>
> --http://www.testdriven.nethttp://weblogs.asp.net/nunitaddin

Tony Spears

unread,
Oct 8, 2008, 1:57:56 PM10/8/08
to TestDriven.NET Users
Hi,

I'm having a similar problem. I had set up unit tests under Visual
Studio 2008 using nunit.framework.dll v. 2.4.8. Everything was
working fine yesterday, but today, I can't run any unit tests at all.
When I right-click to run the test, I get a message in the status pane
that reads "0 Passed, 0 Failed, 0 Skipped". Testing with the
debugger, even with a breakpoint set in the code, yields the same
result. I've reinstalled TestDriven.NET and have tried v.2.2.10, v.
2.4.7, and v.2.4.8 of nunit.framework.dll, all with the same results.
Any ideas of other things I can try to get things working again?

Thanks,

Tony Spears

I've set CopyLocal to "True"
On Sep 12, 10:23 am, "Jamie Cansdale" <jcansd...@gmail.com> wrote:
> Hi Richard,
>
> It is possible that installing Visual Studio 2008 SP1 has updated your
> assembly search path. Please check that your test assembly is compiled
> against the 'nunit.framework' version you expect (e.g using .NET
> Reflector). I usually include 'nunit.framework.dll' in my test project
> to ensure that a specific version is always used.
>
> > However, I tried replacing the files in the NUnit\2.4 directory with the
> > 2.4.6 files and it didn't help.
>
> TestDriven.Net should work fine with 'nunit.framework' 2.4.6 and
> below. There is an adapter in the NUnit\2.4 directory that is compiled
> against a specific version of NUnit. If you update the NUnit files,
> you will likely break TestDriven.Net.
>
> Try reinstalling TestDriven.Net, including 'nunit.framework.dll' in
> your test project, recompiling and then see if it works.
>
> Regards,
> Jamie.
>
> --http://www.testdriven.nethttp://weblogs.asp.net/nunitaddin

Jamie Cansdale

unread,
Oct 8, 2008, 2:15:40 PM10/8/08
to TestDri...@googlegroups.com
Hi Tony,

Can you executing your tests with Sysinternals DebugView running in
the background?
http://technet.microsoft.com/en-us/sysinternals/bb896647.aspx

If any exceptions are being thrown inside TestDriven.Net, they should
show up in the log. Please email me anything that looks suspicious.

Regards,
Jamie.

Tony Spears

unread,
Oct 8, 2008, 2:25:33 PM10/8/08
to TestDriven.NET Users
Thanks for the quick response!

BTW, I'm running this under Vista SP1. Just gave it a try using
DebugView, and yes, there is an exception being thrown. Looks like
it's having trouble saving something:

00000000 0.00000000 [5256] Left. Enter HWND 360f1e
00000001 8.03595924 [5256] Left. Enter HWND 360f1e
00000002 9.04874802 [5256] Enter HWND e0be8
00000003 9.48294640 [5256] Left. Enter HWND 360f1e
00000004 9.48305798 [5256] >> MSEnv extensibility
IClassFactory::LockServer(TRUE), lock count: 3
00000005 9.48436642 [5256] >> MSEnv extensibility
IClassFactory::LockServer(FALSE), lock count: 2
00000006 9.48497486 [5256] >> MSEnv extensibility
IClassFactory::LockServer(TRUE), lock count: 3
00000007 9.48581028 [5256] >> MSEnv extensibility
IClassFactory::LockServer(FALSE), lock count: 2
00000008 9.48598099 [5256] >> MSEnv extensibility
IClassFactory::LockServer(TRUE), lock count: 3
00000009 9.48666286 [5256] >> MSEnv extensibility
IClassFactory::LockServer(FALSE), lock count: 2
00000010 9.52917957 [5256] >> MSEnv extensibility
IClassFactory::LockServer(TRUE), lock count: 3
00000011 9.53108406 [5256] >> MSEnv extensibility
IClassFactory::LockServer(FALSE), lock count: 2
00000012 9.53421593 [5256]
System.Reflection.TargetInvocationException: Exception has been thrown
by the target of an invocation. --->
System.Runtime.InteropServices.COMException (0x8000FFFF): Catastrophic
failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))
00000013 9.53421593 [5256] at EnvDTE.Document.Save(String FileName)
00000014 9.53421593 [5256] at
TestDriven.Services.DocumentUtilities.SaveDocuments(DTE dte)
00000015 9.53421593 [5256] at
TestDriven.Services.TestRunner.VSTestRunner.execute()
00000016 9.53421593 [5256] at
TestDriven.Services.TestRunner.VSTestRunner.ExecuteRunner.Run()
00000017 9.53421593 [5256] --- End of inner exception stack trace
---
00000018 9.53421593 [5256] at
System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[]
arguments, SignatureStruct& sig, MethodAttributes methodAttributes,
RuntimeTypeHandle typeOwner)
00000019 9.53421593 [5256] at
System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[]
arguments, Signature sig, MethodAttributes methodAttributes,
RuntimeTypeHandle typeOwner)
00000020 9.53421593 [5256] at
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags
invokeAttr, Binder binder, Object[] parameters, CultureInfo culture,
Boolean skipVisibilityChecks)
00000021 9.53421593 [5256] at
System.Delegate.DynamicInvokeImpl(Object[] args)
00000022 9.53421593 [5256] at
System.Delegate.DynamicInvoke(Object[] args)
00000023 9.53421593 [5256] at
TestDriven.Services.TestRunner.VSTestRunner.ThreadRunner.run()
00000024 9.53453827 [5256] >> MSEnv extensibility
IClassFactory::LockServer(TRUE), lock count: 3
00000025 9.53580093 [5256] >> MSEnv extensibility
IClassFactory::LockServer(FALSE), lock count: 2
00000026 12.66435337 [5256] Left. Enter HWND 360f1e

I made sure that all the folders and subfolders in my project are
writable and tried to run the tests again. I still get the "0/0/0"
message, and no tests are run. Anything else I should check?

Thanks for your help with this!

On Oct 8, 1:15 pm, "Jamie Cansdale" <jcansd...@gmail.com> wrote:
> Hi Tony,
>
> Can you executing your tests with Sysinternals DebugView running in
> the background?http://technet.microsoft.com/en-us/sysinternals/bb896647.aspx
>
> If any exceptions are being thrown inside TestDriven.Net, they should
> show up in the log. Please email me anything that looks suspicious.
>
> Regards,
> Jamie.
>
> --http://www.testdriven.nethttp://weblogs.asp.net/nunitaddin

Tony Spears

unread,
Oct 8, 2008, 2:34:05 PM10/8/08
to TestDriven.NET Users
I tried setting up a simple test solution and project, and the unit
tests do work there. So this looks like a solution- or project-
specific issue.

Jamie Cansdale

unread,
Oct 9, 2008, 5:57:02 AM10/9/08
to TestDri...@googlegroups.com
Hi Tony,

Could you send me another log, except using the following build:
http://www.testdriven.net/HoldingBay/TestDriven.NET-2.16.2218_Personal.zip

I've hardened the method it was throwing in and added some extra
logging information (the full name of the item it was trying to save).
I'm interested to find out why it's having problems with a particular
document (or documents).

Regards,
Jamie.

--
http://www.testdriven.net
http://weblogs.asp.net/nunitaddin

Tony Spears

unread,
Oct 9, 2008, 10:43:13 AM10/9/08
to TestDri...@googlegroups.com
I uninstalled my current version and installed 2.16, and the tests now run.  I reinstalled 2.14, and the tests run under that version as well.  No changes were made to the project or its files on either run. 

So I'm up and running again.  It would have been nice to have been able to track down the cause of the problem, though.

Again, thanks for your help!
--
Chances are if your parents didn't have children, you won't either.

–Dick Cavett
Reply all
Reply to author
Forward
0 new messages