UPDATE AND SUMMARY: I need to (via API/custom activity presume) set a certain build's flavor
and Platform
during its execution.
I have implemented a workflow (extended from DefaultTemplate.xaml) in Team Build 2010 that allows for running unit tests only using NUnit (from TFS Build Extensions). If the build definition does not contain any projects to build, the binaries are copied from a "parent" build instead, and the tests are run on these instead.
The reason, if you want to know, is that we have a lot of unit tests that take an awful amount of time to execute and we want to be able to run these in parallel on the exact same versions of the binaries.
My problem is that the tests run only show up in the build summary if there was a compilation step in the build. If the tests were done on a copy, no test results are shown. I have struggled to find out how this is triggered within the workflow, to no avail.
I can see in the logs that the tests are executed and published in the same way in both cases, e.g.:
> Running C:\Program Files (x86)\NUnit
> 2.5.7\bin\net-2.0\nunit-console.exe /nologo /labels "Framework.Tests.dll"
> /exclude="Weekly,Manual"
> /xml="D:\TFS\UT_2\Bin\Release\NUnitResults.xml"
> /out="NUnitOutput.txt" ... Processing
> D:\TFS\UT_2\Bin\Release\NUnitResults.xml Running
> C:\Program Files (x86)\Microsoft Visual Studio
> 10.0\Common7\Tools\\..\IDE\MSTest.exe /publish:"http://tfs.myfirm.com:8080/tfs/DefaultCollection"
> /publishresultsfile:"D:\TFS\UT_2\Bin\Release\NUnitResults.trx"
> /publishbuild:"UT-MyProduct_1.18.0.1366.1"
> /teamproject:"MyProject" /platform:"x64" /flavor:"Release" Microsoft
> (R) Test Execution Command Line Tool Version 10.0.30319.1 Copyright
> (c) Microsoft Corporation. All rights reserved. Waiting to
> publish... Publishing results of test run tfsbuild@BUILDSERVER
> 2012-03-30 10:53:28 to
> http://tfs.myfirm.com:8080/tfs/DefaultCollection...
> .................Publish completed successfully.
By fixing the build order, I at least managed to give the build the correct result. The build ID used by MSTest is the correct one, but I'm currently guessing that it has to do with that this build doesn't get any values for platform
and flavor
. Are these values possible to set manually somehow?