If you look in the .proj file that Team build uses it’s
documented how to run tests without a test list:
<!-- TEST ARGUMENTS
If the RunTest property is set to true
then the following test arguments will be used to run
tests. Tests can be run by specifying
one or more test lists and/or one or more test containers.
To run tests using test lists, add
MetaDataFile items and associated TestLists here. Paths can
be server paths or local paths, but
server paths relative to the location of this file are highly
recommended:
<MetaDataFile
Include="$(BuildProjectFolderPath)/HelloWorld/HelloWorld.vsmdi">
<TestList>BVT1;BVT2</TestList>
</MetaDataFile>
To run tests using test containers, add
TestContainer items here:
<TestContainer
Include="$(OutDir)\HelloWorldTests.dll" />
<TestContainer
Include="$(SolutionRoot)\TestProject\WebTest1.webtest" />
<TestContainer
Include="$(SolutionRoot)\TestProject\LoadTest1.loadtest" />
Use %2a instead of * and %3f instead of
? to prevent expansion before test assemblies are built
-->
From:
win_tech_off_topic@yahoogroups.com [mailto:win_tech_off_topic@yahoogroups.com] On
Behalf Of SteveC
Sent: Tuesday, November 03, 2009 2:41 PM
To: win_tech_off_topic@yahoogroups.com
Subject: [OT] Test All Tests in TFS Build Server?
I have multiple (VS not nUnit) unit tests that I would like to run
after-build on my TFS 2008 box. I don't want to use the .testrunconfig file or
.vsmdi file because they have a few problems in my multi-developer setup. I
would like for the build server to do some inspection of every test*.dll file
in my 'drop directory' and run any tests it finds there. the tests are database
(gdrv2) tests and regular unit tests also.
There seem to be plenty of resources and hacks and etc for 2005,
but they involve changing things or doing things that don't apply to the 2008
product. Can anyone throw me their $.02 on this one?