Excepción "La ruta no tiene forma legal" al publicar resultados de pruebas personalizados en TFS2010

This is the output that I get from TFS Build when trying to publish my custom made trx file to the build that is running:

Running C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools..\IDE\MSTest.exe /publish:"http://tfsserver:8080/tfs/SpikeCollection" /publishresultsfile:"D:\Projects\TFSBuild\1\test\TestApp\Binaries\username_pcname 2011-11-08 02_30_04_Mixed Platforms_Debug.trx" /publishbuild:"bpTestApp_20111108.13" /teamproject:" test" /platform:"Mixed Platforms" /flavor:"Debug"

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 username_pcname_2011-11-08_02_30_04_Mixed_Platforms_Debug to http://tfsserver:8080/tfs/SpikeCollection... .The path is not of a legal form. Publish failed or canceled.

preguntado el 08 de noviembre de 11 a las 14:11

Try open the trx file from in VS and see if you get the same error? -

Please provide more info on how you construct your TRX. Do you get this error with each and every file? -

@Duat Le: I can open the trx in VS but I cannot publish the results to TFS -

@pantelif: I constructed the trx from test results that I receive from DUnit (Delphi unit tests) and the trx file looks good in VS but I cannot get it in TFS to fail the build when tests fail. -

3 Respuestas

A rather safe hypothesis is that your culprit is the TRX file.

One possible method of revealing any problem with it is to debug it with a tool like trx2html.

respondido 25 nov., 11:18

A nice html is created when I use trx2html. The TRX can also be opened in VS but only the publishing fails. - Wouter Janssens

OK, so that should probably turn the focus of the investigation towards the publishing part. See my other answer on that. - pantelif

We have a similar setup like yours, but instead of DUnit we are using NUnit.
Luckily for us there is this codeplex project NUnitTfs, where the NUnit output is transformed into TRX & then gets published into TFS. Although it is an Alpha version, it does work seamlessly for us. I looked around and there doesn't seem to exist a comparable utility for the DUnit variant.

You could take advantage of NUnitTfs: download the code & review it to get an idea of how the publishing actually goes down.

Besides the review, if you have a "DUnitToMSTest.xslt", it should be trivial to use the NUnitTfs implementation as a vehicle for implementing your very own DUnitTfs.

It seems you would have to only fork the method XslCompiledTransform and pass your XSLT instead of the default NUnit-related.

respondido 30 nov., 11:13

I didn't have the time yet to convert my code to start using the buildextensions from codeplex to create my trx with xslt but this answer will probably help me. That's why you get the bouty. - Wouter Janssens

Hey, thanks a lot! Please let me know if you need any help when you come around to do it. - pantelif

I found the problem on my own question. I forgot to add the section TestSettings in the begin of the trx xml. The moment I added this it was possible to publish the results to TFS

Respondido el 20 de enero de 12 a las 13:01

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.