Tests Not Runnable, Multiple Tests with ID Found  
Author Message
S&#248&#59;ren Spelling Lund





PostPosted: Visual Studio Team System - Testing, Tests Not Runnable, Multiple Tests with ID Found Top

Hello,

I've started using Team System for unit testing and have been very pleased with it for a while but recently I've run into a strange error on some of my tests.

When I try to run the unit test project all my tests are marked with the message, "Not Runnable", and I get an error message saying, "Multiple tests with ID <guid> found". Other test projects in the same solution are fine and run without incident.

If I rename the class containing and rebuild the solution the tests run just fine but if I shut down Visual Studio and relaunch it the error is back.

Am I doing something wrong

Thanks.



Visual Studio Team System14  
 
 
Johnny Coleman MSFT





PostPosted: Visual Studio Team System - Testing, Tests Not Runnable, Multiple Tests with ID Found Top

Are you using inheritance in the Unit test that are failing If so, Inheritance is not supported for Unit Test. Also, did you naming scheme change and if so is it still able to generate a unique name for each test run. You can check this by looking at the Test menu, Edit Test Run Configurations and it will be in the general section.

 
 
Soren Lund





PostPosted: Visual Studio Team System - Testing, Tests Not Runnable, Multiple Tests with ID Found Top

I did use inheritence and am frankly a little bit surprised that it is not supported by Team System. I tried removing my super classes and ran the tests using single classes. When I restarted VS and tried rerunning the tests I still got "Not Runnable". As before renaming the test class and compiling makes the tests work until the next restart of VS.

My naming scheme is set to default.

Thanks.



 
 
Johnny Coleman MSFT





PostPosted: Visual Studio Team System - Testing, Tests Not Runnable, Multiple Tests with ID Found Top

Could be testrunconfig file maybe currupt or bad test run in the results folder. If the solution is not very big, try rebuilding the solution by creating a new solution and add the existing projects to the new solution. In the case of the Unit test, also create a new test project and add just the cs or vb files for the unit test.

A couple more questions:

1. In your test class, are you using static constructors

2. At some point did you rename one of the projects



 
 
Joe Rohde





PostPosted: Visual Studio Team System - Testing, Tests Not Runnable, Multiple Tests with ID Found Top

Inheritence is getting put in place. Sorry it doesn't work on the current version.

If you've undone that and have nothing unusual, I'm quite confused as to why this would happen. Would you be able to mail me the test file(s) source Even if you strip the bodies of the methods out - it would be fine.

If you don't want to do this, if you could at least post me something resembling the actual structure

Thanks!

Joe



 
 
Soren Lund





PostPosted: Visual Studio Team System - Testing, Tests Not Runnable, Multiple Tests with ID Found Top

I tried adding a new testrunconfig but it had no effect.

The solution is pretty big containing around 20 projects structured in solution folders. I'll go ahead and get a buildtree and try some experiments with that. I'll let you know what I find.

As to your questions:
1) No static constructors on either tests or test targets.
2) I may have renamed projects. At this point I can't remember if it's the case.


 
 
Jake42





PostPosted: Visual Studio Team System - Testing, Tests Not Runnable, Multiple Tests with ID Found Top

I am getting the same error. Have you found any explenation for it

/Jacob


 
 
Luis Fdez





PostPosted: Visual Studio Team System - Testing, Tests Not Runnable, Multiple Tests with ID Found Top

I found a workaround about this, if you go to Test View or Test Manager and click on Refresh button you fix it


 
 
Soren Lund





PostPosted: Visual Studio Team System - Testing, Tests Not Runnable, Multiple Tests with ID Found Top

Thanks. I will definitely try that out.