TRX files?

Aug 22, 2011 at 10:57 AM

Hi

Are there any plans of making the tool generate TRX files from the test results?

Martin M
Software Architect

Coordinator
Aug 22, 2011 at 6:45 PM

There's no explicit or immediate plans to, however I don't think it has to stay this way.

The following link may help you with your needs (http://statlight.codeplex.com/wikipage?title=TFS&referringTitle=Documentation). Others have accomplished this by cobbling some things together, although not ideal.

I don't think it would be too hard to add support, however I have not found very much information/documentation regarding the output format. So if you don't feel like forking and adding the support directly into the project, but could do some research and help track down how to implement it. I could take a stab.

Thanks,
Jason

Aug 23, 2011 at 1:28 PM

Well, a couple of XML schemas would be a great start for conjuring up a transformation. The shcema file for MSTest can be found in C:\Program Files (x86)\Microsoft Visual Studio 10.0\Xml\Schemas\vstst.xsd. I haven't had that much time looking at the source code of StatLight. Is there a good XML schema for the produced XML?

Martin

Coordinator
Aug 25, 2011 at 12:20 AM

I pushed a new branch called "trx" up to github https://github.com/staxmanade/StatLight/tree/trx

I laid the original groundwork to get this accomplished. The following file is what you will need to change to make this thing work. I stubbed it out, but it is not working at it's current state. https://github.com/staxmanade/StatLight/blob/trx/src/StatLight.Core/Reporting/Providers/MSTestTRX/TRXReport.cs

I'm on vacation and can try to put more time on it when I get back. However no guarantees. Please take a stab at it and let me know if you have any questions.

Be sure to use the .bat files to accomplish builds and run tests.

Hope this helps.

Jason

Sep 7, 2011 at 4:12 AM

Hi guys, sorry to butt in, can I add my vote for this one? If StatLight can spit out a TRX file for us then we can easily automate the publishing of those results using MSTest within our TFS 2010 build process, which would be fantastic.

Happy to wait for this in an upcoming release, would appreciate a ping when it is.

Thanks!

Sam

Coordinator
Sep 18, 2011 at 3:41 AM
Edited Sep 21, 2011 at 8:12 PM

Hey Guys,

I have some initial work for the TRX support out on the latest and greatest. If you go the statlight home page there's a link to latest build up on teamcity. Could you please download, try and give any feedback you have?

The following file is where I'm generating the output from https://github.com/staxmanade/StatLight/blob/master/src/StatLight.Core/Reporting/Providers/MSTestTRX/TRXReport.cs

If you have any suggestions, I'm all ears.

As I don't use MSTest (or need the TRX for anything) I won't be dog fooding this. So please report any issues and I'll try to get them fixed.

Thanks

Coordinator
Sep 21, 2011 at 3:13 PM

Any status guys?

Sep 21, 2011 at 8:02 PM

404 on that last link.

Coordinator
Sep 21, 2011 at 8:13 PM
Edited Sep 21, 2011 at 8:13 PM

I updated the link - https://github.com/staxmanade/StatLight/blob/master/src/StatLight.Core/Reporting/Providers/MSTestTRX/TRXReport.cs (removed the trx branch as I merged it into master).

You can download the latest version from teamcity (go to home page to find the link) you should be able to run statlight and specify the report output type of TRX. Let me know if that works for you.

Dec 9, 2011 at 8:01 AM

I use it on the PC: WinServer2008SP2 x64, Silverlight 4:

StatLight.exe -x=mytest.xap --ReportOutputFileType=TRX -r=.\test.trx (-r=test.trx - doesn't work)

I got test.trx, but the report did not contain the "owner" attribute for the tests.
I added it only for the TRX report.

Next problem was
WebBrowserType = defaultValue(selfHosted) doesn't work on the x64 platform. Did you check it?
I built it for the x86 platform and it works. For the another WebBrowserType (chrome, firefox) it works for the x64 platform too. 

I will send my changes to you.

Coordinator
Dec 9, 2011 at 1:44 PM

Hello Vladimir,

Thanks for your patch you sent me. I've included it https://github.com/staxmanade/StatLight/commit/157becb20b28920618f05fee7ef06c1f0e3fe617.

The selfHosted is a known issue in general because if you build StatLight to run on x64 it will therefore use an x64 browser control. Silverlight doesn't run in a x64 bit browser (yet). The solution as you found out is to change the build platform target to x86. Also if you try to use the firefox/chrome browser types, these are separate processes and I believe they startup in x86 mode by default anyway. Which is why it probably worked for you. Hope this helps.

Again, thanks for the patch. Let me know if you notice any other issues with the TRX format.

Jan 28 at 4:07 PM
Hello,

I generate unit test reports based on TRX format.
Is it possible to fill up codeBase same as MS does (full path to the test assembly)? At the moment it is empty.
TRXREports.cs:
new XElement(ns + "TestMethod"
                              , new XAttribute("codeBase", string.Empty)
I use codebase during xslt transformation later

Example:
codeBase="d:/cc.net/projects/4711/Release/MyTest.DLL"
Thank you
Jan 30 at 11:21 AM
pgrishanov wrote:
Hello,

I generate unit test reports based on TRX format.
I implement filling codeBase with the xap name in my local version of the StatLight.
Coordinator
Jan 30 at 6:18 PM
Great initiative on and thanks for submitting a Pull request. https://github.com/staxmanade/StatLight/pull/15