tag:blogger.com,1999:blog-7253819249303788337.post3918322184892641329..comments2017-03-16T04:47:59.453-07:00Comments on Dave Barrows Tech Blog: Parsing MSTEST results (.trx files) programmatically (in C#)DavidBarrowshttp://www.blogger.com/profile/14523842675012634279noreply@blogger.comBlogger8125tag:blogger.com,1999:blog-7253819249303788337.post-75660628935280334212016-02-24T02:46:01.894-08:002016-02-24T02:46:01.894-08:00Presently the results are retrieved for the trx fi...Presently the results are retrieved for the trx file which is already generated. My question is before the generation of the .trx file , is it possible to access the results which is going to be written in to the .trx file? If so then how this can be done programatically?<br /><br />Thanks and Regards<br />SrinivasSrinivashttps://www.blogger.com/profile/04543814443605318728noreply@blogger.comtag:blogger.com,1999:blog-7253819249303788337.post-66901415416415004142016-02-24T02:44:07.603-08:002016-02-24T02:44:07.603-08:00Hello !!!
Is it possible to access the results (w...Hello !!!<br /><br />Is it possible to access the results (which are going to be written in .trx file) during the test run before the final .trx file gets generated . If so then how this can be acheived?<br /><br />Thanks and Regards<br />Srinivas Srinivashttps://www.blogger.com/profile/04543814443605318728noreply@blogger.comtag:blogger.com,1999:blog-7253819249303788337.post-15540265883720283002015-12-21T22:44:01.115-08:002015-12-21T22:44:01.115-08:00@Akanksha, sounds like you'd have to code that...@Akanksha, sounds like you'd have to code that by hand. The System.IO namespace in C# should allow you to open both files and parse them in creative ways to get the result you want. https://msdn.microsoft.com/en-us/library/system.io.file.readalllines%28v=vs.110%29.aspx, and/or use various XPath or XSLT approaches. That's all I can really suggest for a question like that. On the other hand, I wonder, why would you need such a tool? If a test is failing, it should be fixed, and it doesn't really matter that it was passing in the previous build... DavidBarrowshttps://www.blogger.com/profile/14523842675012634279noreply@blogger.comtag:blogger.com,1999:blog-7253819249303788337.post-27411820057107439122015-12-21T22:43:15.804-08:002015-12-21T22:43:15.804-08:00This comment has been removed by the author.DavidBarrowshttps://www.blogger.com/profile/14523842675012634279noreply@blogger.comtag:blogger.com,1999:blog-7253819249303788337.post-46689318972995788992015-12-14T02:56:56.078-08:002015-12-14T02:56:56.078-08:00Is there any way or tool which compares two trx fi...Is there any way or tool which compares two trx files i.e last test result and new test result and identifies the tests which were passing in last build and are failing in new build.<br /><br />Akshttps://www.blogger.com/profile/10743357197269362415noreply@blogger.comtag:blogger.com,1999:blog-7253819249303788337.post-20598839214854787392015-12-14T02:55:41.449-08:002015-12-14T02:55:41.449-08:00This comment has been removed by the author.Akshttps://www.blogger.com/profile/10743357197269362415noreply@blogger.comtag:blogger.com,1999:blog-7253819249303788337.post-63133811895731488222013-09-18T12:50:08.027-07:002013-09-18T12:50:08.027-07:00Hi Sourodeep, it's been awhile since I did tha...Hi Sourodeep, it's been awhile since I did that work. But if I understand your question, looking at the above C# code I posted, it shouldn't be difficult to pass in the path to the file(s) as a parameter using the System.IO namespace, e.g. http://msdn.microsoft.com/en-us/library/system.io.directory.getfiles.aspx . Good luck, -DaveDavidBarrowshttps://www.blogger.com/profile/14523842675012634279noreply@blogger.comtag:blogger.com,1999:blog-7253819249303788337.post-43265289174798568932013-09-17T22:40:51.608-07:002013-09-17T22:40:51.608-07:00Is the VSTST.CS file generated by xsd.exe tool uni...Is the VSTST.CS file generated by xsd.exe tool unique for every .trx files? I have to prepare a tool which parses .trx file at some dynamically provided location each time it runs. Any pointers regarding the same??Anonymoushttps://www.blogger.com/profile/10138348056030425358noreply@blogger.com