I got into work this morning and I found that our build had misterously broken over night and the tests had started to fail.  (One if the challanges we have at the moment is our build machine is on a laptop that gets locked away at night so sometimes people can checkin with out having a build fired off).   Anyway, after a quick look at the exception that was being raised in the tests the files wheren’t being found on the build machine.  Easy I thought, I have seen this issue before somebody has played around with the .testrunconfig and the we have got a trailing slash.    I quickly opened up the .testrunconfig and to my suprise it look fine.    There where 2 directories and a couple of files in the deployment item section and the directories had the trailing slash removed.   Dam! This is going to be fun.   To cut a long long story short.   I spent the next 3 hrs, trying to get different combinations to see if I could get the files to be copied across.    In frustration I decided to take a break.  Always a good thing if you have been looking at a problem for a while.  I went back to see what had changed in the last changeset.  On closer examination I noticed that somebody had added directory called “TestData”.   Nothing out of the ordinary, however, in the deployment section of the .testrunconfig file we where trying to deploy a directory called TestData.   I said to myself, this couldn’t be the problem could it?  So I renamed the directory and started the build off again.   Amazingly, it started working. 

So the moral to this story is two fold.  Firstly, always, take a break when thinking about a problem.    Secondly, remember if you are using directories as DeploymentItems in your tests make sure there isn’t the same directory anywhere in your solution.  As an aside, I’m not happy that I don’t know why this is happening so I might go and see if I can find out how to undertand why it works like this.  

Advertisements