Creating MSTest .trx test results file

May 19, 2011 at 8:01 AM

Is there anybody who has done the exercise to transform the StatLight results file to a MSTest .trx results file? So that the test result can be published to TFS?

E.g. with an XSLT transform (like it is done for NUnit here: http://nunit4teambuild.codeplex.com/wikipage?title=How%20it%20works) or throught .NET code

 

Coordinator
May 19, 2011 at 12:42 PM

I don't know of anyone creating a trx at this point.

Are you aware of the following project? http://statlightteambuild.codeplex.com/ (Don't know if this will help you).

Another option is to use the Generic Test output that StatLight creates. (Sorry haven't put this up in the docs yet). You can create an MSTest Generic Test and specify the results as the StatLight output. You can then in conjunction with the -r:<path> parameter specify the --MSGenericTestFormat to give the needed format for summary results.

If none of the above work for you, I'd appreciate it if you considered adding this feature to StatLight? I'd be happy to help guide you.

Hope this helps.

May 19, 2011 at 1:17 PM
Edited May 20, 2011 at 6:24 AM

I have already tried the Generic Test option. This works, but reporting the results in TFS is not that nice, because it will be reported to TFS as just one test, which will be failed when one of the Silverlight tests fail.

I was not aware of the statlightteambuild project. I took a look at it now. Although the project description states that it publishes the results to TFS, this is not the case. It is just reporting the some simple messages to the build report. He is not creating a trx file. In fact the functionality of this project I have already build myself a bit more advanced. Which was not that much of work.

I have now StatLight running fine on my buildserver. And it is reporting the errors in the build report. The last step which would be nice to have is the trx file. But a trx file is a bit complex, so I don't want to spend my time on that. Although the NUnit project has a template for it with their XSLT, but I don't have knowledge of XSLT.

So if you ever hear somebody does this step, I am interested ;-)

Coordinator
May 19, 2011 at 3:03 PM
Edited May 19, 2011 at 3:03 PM

Understood...

Another thing to look at. The following project might work for you to convert the statlight output to nunit - which could possibly be used to convert to a trx? (too many levels of translation) but let me know if this works for you.

https://github.com/andywhitfield/StatLightToNUnitReportGenerator

I threw a message to andywhitfield (of the project above) to see if he could integrate it into StatLight. He sounded interested, but hasn't taken any steps to do so yet. Maybe you could give him some encouragement ;P

May 20, 2011 at 11:49 AM

Interesting...

I have glued together the code of andywhitfield with the transformation code for the NUnit4TeamBuild project and that delivers a useful trx file.

I you are interested, I can send you the code.

Coordinator
May 20, 2011 at 1:39 PM

I am interested in taking a look (no guarantees that it'll get integrated the same way - but maybe it'll kick me to start something for real.)

One way you can share is to upload it as a "patch" to this site (or whatever file/sharing you'd prefer)

Thanks.

May 20, 2011 at 6:33 PM

I have uploaded it as a patch.

The only real issue I currently have is a problem in the xsl transformation on which I posted a message in the NUnit4TeamBuild project: http://nunit4teambuild.codeplex.com/discussions/258380

 

Coordinator
May 20, 2011 at 8:21 PM

Thanks for the update... If I have some downtime I'll consider adding direct support to StatLight. 

Jun 6, 2011 at 7:12 PM

I see the --MSGenericTestFormat parameter in the latest build - any guidance on how to use this?

Coordinator
Jun 7, 2011 at 4:15 AM

corlinbo: Sorry I need to do some documentation updating... Hopefully this blog post may help you understand how to use it http://www.nielshebling.de/?p=167