views:

359

answers:

4

We want to run our unit tests on our TFS server. We are running the database, TFS and the build agent on the same machine.

We have set it up and it appears to work up to the point that MStest tries to publish the results to the TFS server.

We get the following error:

The "TestToolsTask" task is using "MSTest.exe" from ......

Invalid switch "/publish".

Invalid switch "/publishbuild".

Invalid switch "/teamproject".

Invalid switch "/platform".

Invalid switch "/flavor".

For switch syntax, type "MSTest /help"

MSBUILD : warning MSB6006: "MSTest.exe" exited with code 1.

We think that the reason why we are getting this is that we have installed the professional version of Visual Studio on the build server.

Question is: Do we have to install a Team System Edition of Visual Studio on the build server or will it work if we just install the TFS client?

Thanks

Shiraz

+1  A: 

I am not 100% sure on this, but I'm fairly certain you need to install the Team System Edition of Visual Studio.

The client is just that, client software. Including items such as Work Item Tracking, Source Code Control, etc ... What you're looking for is the server side of the functionality and that comes with the team system edition.

JaredPar
Not sure what you mean. VSTS Team editions don't come with any server features (apart from the CAL for licensing purposes).
Richard Berg
+2  A: 

We did this and I am pretty sure you need to install a version of Visual Studio Team Edition in order to publish a test to TFS :(

Found this link that says the same thing.

ongle
+1  A: 

To publish unit test results from the build, then you need to install a Team Edition of Visual Studio - either the Developer or Test edition will do. MSTest.exe is available in other versions of Visual Studio however when you go to publish test results it will throw an error. IMHO, the way that licensing works is that you can install the team edition on the build server provided the people checking in code (such as test code) have licenses - however you'll want to check with your Microsoft representative.

Martin Woodward
+1  A: 

Yes, you need to install (at minimum) the extra tools that come with VSTT (Team Test) or VSTS (Suite) editions. The basic ability to write & execute unit tests inside VS were moved down from VSTT -> Professional in the 2008 product editions, but the specific scenario around publishing tests on the server was not.

As a general rule MS developer tools are licensed per-user, not per-machine. 2008 adds a few exceptions to the rule when it comes to non-IT staff use of work item tracking, but for the most part it still holds. Complete details: VSTS 2008 licensing white paper

Richard Berg