This project is read-only.

Removal of need for JavaScript

Apr 29, 2011 at 4:55 AM

A really useful enhancement to this tool would be to not use JavaScript to generate the summary information.  This would allow email delivery of the results (since obviously javascript is never executed in an email).  In any case, since the tool generates a html file, it can very easily generate the summary information.  I have ported the javascript code to C# and included a -nojavascript option to trx2html and this is working fine for us.  I am happy to share the code changes I did, however I think it would be better not to need a -nojavascript option, and just do the changes to generate plain html instead. 

May 5, 2011 at 9:50 PM

faxedhead, can you share the code changes you've made? If it's not too large of changes, perhaps you can paste into this thread the changes needed, otherwise you can send it to me via email or something.



May 16, 2011 at 12:37 AM

Latest version (0.7) does not need Javascript anymore !! And now the complete parsing is done with LINQ2HTML

May 16, 2011 at 11:31 AM

Great work!  Sorry I was going to post my code, but you beat me to it.  I just ran 0.7 against the supplied sample report (rido_RIDOXPS 2010-04-10 00_58_47.trx) and saw that there was still some javascript in there - the togle() function.  Showing a stack trace is probably useful in all cases, so no need to be able to toggle display of that in a test report.  Developers want to see stack traces whenever there's a problem :) 

Also, are you planning to drop support for VS2008/05 completely?  or is 0.7 just a temporary release before you migrate these no-javascript changes to those file formats as well?  We are only using VS2010 here, but I imagine there are many others still with tests in VS2008/05...

Thanks :)

May 16, 2011 at 11:36 AM

yes you are right, I only use JS to make the show/hide of StackTraces.. ¿do you know other way to do it? Anyway if you do not enable JS, you can still see the summaries with bars.

I do not think I will support older formats, the new parser is based on .Net 4.0, so I do't know if makes sense to mantain backwards compatibility, it will slow down the new functionalities I would like to add.. (sorry) however, this is an open source project, so if anyone wants to invest some time to parse old trx files...

May 24, 2011 at 10:50 AM

Sorry for the delayed response.

Regarding the remaining JS, no I don't know of any other way to do it, but my point was that hiding stack traces is probably not that useful anyway, since normally if there are any failed tests, we want to see stack traces straight away.  So I would recommend that stack traces are always displayed.  It's true that sometimes stack traces can be large, but they are usually no more than a dozen or so lines at most.

Regarding support for VS2008/05, I'm surprised that moving trx2html.exe to .NET 4 should have any affect on the ability to parse VS2008/05 .trx files.  Of course MS is able to change this file format every version of Visual Studio, and so with each new VS release there is likely to be maintenance to be done to this project to support the new version's trx files, but this should be independent of the version of .net used to build trx2html.  even if you are using some new features in .net 4, I would have thought the logic for parsing old versions of trx files would remain intact, since .net is backwards compatible...  I just think it's a little too early to discard VS2008/05 in 2011.