Tuesday, May 29, 2007

Team System Unit Tests and Deployment Items

Deployment files for unit tests

The files to be deployed with the tests have to be setup so that the tests can run successully on local machine and also on the build machine. Data files such as .cvs, .xml files etc. usually sits in the project directory along with everything all of the rest of my code files.

However the tests when run on the build machine fail because the files cannot be deployed to the "out" directory of the test results. I get a file IO exception – my .Xml file could not be located.

To make it work i had to do 2 things:

  • I select my data files in the solution explorer, and look at the properties window. I can then find the "Copy to Output Directory" setting and change it to "Copy always".

  • Secondly "DeploymentItem" attribute has to be applied to the items to be deployed other than the test assemblies.

You can use either absolute path or relative path to specify the location of the deployment files.

If you are using MSBuild and TeamCity for build, then you have to use a realtive path rather than the absolute path to make it work, because msbuild on the server uses relative paths as configured usually in the .build file.

To add a path for a deployment item please follow the following steps (as it is the easiet way to do so):


Select a test in the Test View window or in the Test Manager window.


Press F4.The Properties window for that test is displayed.


Click the Deployment Items property. An ellipsis (...) appears in the value column.


Click the ellipsis.The String Collection Editor dialog box is displayed.


Before the test is run, type a path to a folder or a file that you want to have copied to the test deployment folder. Press Enter and type additional paths to specify additional folders and files to be deployed.


Click OK.

Friday, May 18, 2007

Engadget's blunder

Yesterday Engadget posted that the iPhone was going to be delayed several months, relying on what turned out to be a bogus email for the story. Four billion dollars in market cap was wiped off of Apple’s stock price in six minutes as the “news” hit the market. Engadget quickly corrected the story and the stock recovered within twenty minutes, but many investors had lost a staggering amount of money in the amount of time it takes to brush your teeth!!!!

Thursday, May 10, 2007

Evaluating .NET/J2EE for your Enterprise Applications

Many orgnizations are currently considering and evaluating .NET and Java (J2EE) as their enterprise application development platform.
I found a very good site which contains extensive materials designed to help you evaluate Microsoft .NET vs. J2EE application server technologies. It contains downloadable whitepapers, benchmark comparisons, and sample source code.

Evaluating .NET vs. J2EE

Well I am sold on .NET for a long time now. I hope the link above helps to make your decision easier.

Thursday, May 03, 2007

Microsoft Silverlight launched

I know i am late by couple of days but still i want to mention, Microsoft has launched Silverlight. Silverlight provides compelling cross platform user experience. It creates richer, more compelling Web experiences that take greater advantage of the client for increased performance. It also delivers media experiences and rich interactive applications (RIAs) for the Web that incorporate video, animation, interactivity, and stunning user interfaces.

If you’ve got the time, I’d recommend (though i havent done it myself yet, but i wil be doing it today evening) watching the Mix keynote video (warning it’s 2.5 hours). In this you’ll get an overview of Silverlight, the cross platform CLR, ruby in the browser, and some very, very cool demos.

You can download silverlight from Microsoft site.