Unit tests not running (4.5)

Well, it's not that it's not always running.

I've got two VS2008 solutions.  SP1.  Current version of Resharper

One was branched off of the other.  I'll call these main and sustainment -- sustainment was created off of main, and changes there are merged back in to main.  No 3rd party unit tests involved.

If I load the sustainment solution, testrunner works fine.  I can run a test in a session and it runs.  I can debug.

If I load the main solution, where I'm wanting to do most of my work, it never runs, it just stays gray.  It builds, , tests go to Pending, but they go back to gray.  If I debug, VS switches to debug mode, and then drops out quickly.

If I run tests out of Visual Studio directly, they work.

And -- the main solution was working a while back.

Something's got to have changed that's preventing it from working, but I don't know where to look to see any meaningful output. I've tried turning off the shadow-copy but that had no effect.

I'd love to be able to just go look at a log file somewhere and see what it's running up against.  I'm about to pull down code from 2-3 months ago and see if it starts working, then work my way forward binary-search-like.

But if anyone has any ideas, I'd be glad to look there first.

Thanks,

-W-

5 comments
Comment actions Permalink

Try checking if you have any issues with app.config file. If you have it,
try temporary removing it and see if tests will run. If you have some global
setup/teardown, try commenting them out temporary and see if it helps.

Sincerely,
Ilya Ryzhenkov

JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


IR> Well, it's not that it's not always running.
IR>
IR> I've got two VS2008 solutions.  SP1.  Current version of Resharper
IR>
IR> One was branched off of the other.  I'll call these main and
IR> sustainment -- sustainment was created off of main, and changes
IR> there are merged back in to main.  No 3rd party unit tests involved.
IR>
IR> If I load the sustainment solution, testrunner works fine.  I can
IR> run a test in a session and it runs.  I can debug.
IR>
IR> If I load the main solution, where I'm wanting to do most of my
IR> work, it never runs, it just stays gray.  It builds, , tests go to
IR> Pending, but they go back to gray.  If I debug, VS switches to debug
IR> mode, and then drops out quickly.
IR>
IR> If I run tests out of Visual Studio directly, they work.
IR>
IR> And -- the main solution was working a while back.
IR>
IR> Something's got to have changed that's preventing it from working,
IR> but I don't know where to look to see any meaningful output. I've
IR> tried turning off the shadow-copy but that had no effect.
IR>
IR> I'd love to be able to just go look at a log file somewhere and see
IR> what it's running up against.  I'm about to pull down code from 2-3
IR> months ago and see if it starts working, then work my way forward
IR> binary-search-like.
IR>
IR> But if anyone has any ideas, I'd be glad to look there first.
IR>
IR> Thanks,
IR> -W-
IR> ---
IR> Original message URL:
IR> http://www.jetbrains.net/devnet/message/5259828#5259828


0
Comment actions Permalink

That didn't help, but in trying to debug each test, I came across that there's a first-chance exception being thrown in one that's not in the other, and it's right after that that TaskRunner bails out.

A first chance exception of type 'Microsoft.VisualStudio.TestTools.CommandLine.CommandLineParameterException' occurred in Microsoft.VisualStudio.QualityTools.CommandLine.dll

So I'm suspecting a reference somewhere that isn't tied up correctly in the move, this was a rather messy branching, unfortunately.  I'm also checking into the local test run configuration to see if something got weirdly assigned somewhere in a merge.

0
Comment actions Permalink

OK, it's resolved.

I appreciate the response, and it was close -- not the app.config bug someone had instrumented something for code coverage in the test run configuration that wasn't marked before.

Undoing the code coverage solved it.  Now I have to go figure out why the code coverage is broken.  

-W-

0
Comment actions Permalink

I had the same error but a different cause in VS2008 and it seemed to be because I somehow ended up with multiple vsmdi files.  Deleting them fixed it.

0
Comment actions Permalink

I had this same problem, it turns out my test class wasn't public.  Hope this helps someone!

0

Please sign in to leave a comment.