Hello,
After moving to a new version I've noticed today that tests are executed constantly. I can leave VS and it will run the test all the time, after finishing executing the batch it starts all over. I dont get green OK on Rusk/Progress.
Any ideas what might be wrong?
Remco NCrunch Developer
#788
20 Dec 2011 09:35 UTC
Hi Archie,
The only thing I can think of that could cause this is if you have a test that is somehow making changes to files that are being watched by NCrunch.
For example, you may have a resource file generated from a test that exists as part of your solution. If you reference this file via an absolute path inside your test and make any kind of change to it, this will trigger NCrunch to detect the change and rerun the tests to ensure none of them are failing.
I suggest selectively ignoring parts of your test project(s) until you can deductively find which test is causing the problem.
The only thing I can think of that could cause this is if you have a test that is somehow making changes to files that are being watched by NCrunch.
For example, you may have a resource file generated from a test that exists as part of your solution. If you reference this file via an absolute path inside your test and make any kind of change to it, this will trigger NCrunch to detect the change and rerun the tests to ensure none of them are failing.
I suggest selectively ignoring parts of your test project(s) until you can deductively find which test is causing the problem.
and what files are watched?? Is there any log or sth like this? In my knowledge there is no tests that write anything to a file.
btw: found a little typo in a ....crunchsolution.local.xml file:
<SolutionConfigured>true</SolutionConfigured>
<AutoEnableOnStartup>True</AutoEnableOnStartup>
<AllowParallelTestExecution>true</AllowParallelTestExecution>
AutoEnableOnStartup requires True (instead of true) the rest take true as valid value.
Regards,
btw: found a little typo in a ....crunchsolution.local.xml file:
<SolutionConfigured>true</SolutionConfigured>
<AutoEnableOnStartup>True</AutoEnableOnStartup>
<AllowParallelTestExecution>true</AllowParallelTestExecution>
AutoEnableOnStartup requires True (instead of true) the rest take true as valid value.
Regards,
Edited 20 Dec 2011 09:49 UTC
Remco NCrunch Developer
#790
20 Dec 2011 09:49 UTC
NCrunch will automatically watch all files that are part of your solution. It then copies them out to a separate workspace, where they are built and the tests held within them are run.
The only thing I can think of is if there is a test that is for some reason reaching out of the workspace and back to the original solution that the files were copied from. Of course this is just a theory, but at face value it would be first guess. I think the key way to resolve this issue would be to find out which test seems to cause the recursion.
Thanks for the tip about the case sensitivity. It isn't supposed to be like that.. I'll note it down for a fix.
The only thing I can think of is if there is a test that is for some reason reaching out of the workspace and back to the original solution that the files were copied from. Of course this is just a theory, but at face value it would be first guess. I think the key way to resolve this issue would be to find out which test seems to cause the recursion.
Thanks for the tip about the case sensitivity. It isn't supposed to be like that.. I'll note it down for a fix.
Edited 20 Dec 2011 09:50 UTC
no problem. The case sensitivity is not an issue for the user as its under the hood but I though that it might save you some time in the future.
As for my main issue I've found the test that causes such behaviour. I'll try to find the exact code that is responsible for this and let you know.
FOUND IT :D
as you wrote before there must have been sth that writes back to the solution.
In my case I had:
xml.Save(string.Format(@"\Demo.Data\Params\{0}.xml", Name), SaveOptions.None);
for collecting demo data in xml-s.
Executing test wrote some stuff to xml which was in a solution (later embedded as a resource) that caused test to be executed again... and again and again.
:D thanks for your help
Regards,
As for my main issue I've found the test that causes such behaviour. I'll try to find the exact code that is responsible for this and let you know.
FOUND IT :D
as you wrote before there must have been sth that writes back to the solution.
In my case I had:
xml.Save(string.Format(@"\Demo.Data\Params\{0}.xml", Name), SaveOptions.None);
for collecting demo data in xml-s.
Executing test wrote some stuff to xml which was in a solution (later embedded as a resource) that caused test to be executed again... and again and again.
:D thanks for your help
Regards,
Edited 20 Dec 2011 10:04 UTC
Post a reply
Log in to reply.