How to integrate with TeamBuild TFS2010

Mar 22, 2011 at 9:23 AM

Hi I have a CI process running on TFS2010 server.  Do you have some guidance on how to integrate with my TeamBuild?  ie how to fire the command line to Lighthouse and gather the results in the correct way?

Thanks in advance...

Coordinator
Mar 24, 2011 at 8:18 PM

I have to investigate this since i dont have a lot of experience with TFS.

I guess any tutorial describing running NUnit unit tests on TFS would be useful since Lighthouse supports NUnit results xml file so just instead of calling NUnit console unit test runner

you would execute Lighthouse.exe.

I will post here and to Wiki if i found something useful.

Thanks for your feedback!

Coordinator
Mar 24, 2011 at 9:42 PM
Edited Mar 24, 2011 at 9:45 PM

This could help you get going:

http://morten.lyhr.dk/2008/05/using-nunit-and-ncover-with-tfs-build.html

basically just follow the tutorial and change this part of config:

 CommandLineExe="$(BuildDirectory)\Sources\Tools\NUnit\nunit-console.exe"          CommandLineArgs="@(TestAssemblies) /xml=$(DropLocation)\$(BuildNumber)\NUnit.xml /labels /nologo"  

and change it to call Lighthouse.exe and send appropriate parameters.

Please do let me know if this works out for you.

Thanks



Jun 13, 2011 at 5:34 AM

I've been trying to get this working with TFS with a little success but have hit a block.

I've found that if I get it to test the dll rather than the xap, then the results.xml file has the output name of "Client.Unittests" which does not work for the import. If I change the xml file to read 

<test-suite type="Assembly" name="Client.UnitTests.dll" executed="True" result="Failure" success="False" time="17.579" asserts="0">

then it seems to be happy importing the results. I'm using NUnitTFS to try to publish the results file (given its nunit format).

C:\Tools\NUnitPublisher\NUnitTfs.exe -n "C:\Builds\1\Project\Autobuild with nUnit\Binaries\results.xml" -t NRW -p "Any CPU" -f Debug -b "Autobuild with nUnit_20110613.11" -v 2010

I feel like i'm really close. Is there a way to control what the name field is (it seems to be happy with the .dll, otherwise I have to rename or copy the dll to Client.UnitTests without the .dll extension. 

cheers,

Stephen

Coordinator
Jun 13, 2011 at 9:35 AM

Thanks for raising this, in next release we will try to fix the Assembly name to be real filename.

Coordinator
Jun 13, 2011 at 9:37 AM

workitem created for this issue:

http://lighthouse.codeplex.com/workitem/11033