Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7409127
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T06:01:54+00:00 2026-05-29T06:01:54+00:00

I have a .trx file (a unit test result file) which is just xml

  • 0

I have a .trx file (a unit test result file) which is just xml inside and I want to read the file compare a few of the tags and change them as necessary and save the file again.

I found that VB.NET has a few tools to help so the first thing I do is load the document into an xml document which seems to work fine but I can’t access any of the data I need. Right now I’m trying to access the attributes of the counters tag and change them after rerunning some of the tests.

So how do I do it?

this loads the file:

Dim Doc As XmlDocument = New XmlDocument
Doc.load("testFile.trx")

Attempted ways to access node:

Dim attribute As Integer = CInt(xmlTrxMasterDoc.SelectSingleNode("/TestRun/ResultSummary/Counters").Attributes(i).InnerText)

Dim node As XmlNode = xmlTrxMasterDoc.SelectSingleNode("/Counters")
Dim i As Integer = 1
node.Attributes.Item(i).InnerText

XML

<?xml version="1.0" encoding="utf-8"?>
<TestRun someattributes="" >
    <ResultSummary outcome="Failed">
        <Counters total="115" executed="115" passed="110" error="0" failed="5" timeout="0" aborted="0" inconclusive="0" passedButRunAborted="0" notRunnable="0" notExecuted="0" disconnected="0" warning="0" completed="0" inProgress="0" pending="0" />
    </ResultSummary>
</TestRun>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T06:01:56+00:00Added an answer on May 29, 2026 at 6:01 am

    This document may help you:
    http://support.microsoft.com/kb/301225

    Also take a look at “Linq to xml” that helps a lot: http://www.aspfree.com/c/a/VB.NET/LINQ-to-XML-Programming-Using-Visual-BasicNET-2008/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Have just started using Visual Studio Professional's built-in unit testing features, which as I
I have written an xsl for converting the trx file of mstest into html.
I have a two table. I want to get the below result out from
Have an XML with next form: <categories someAttribute=test> <category id=1> <title></title> </category> <category id=1>
I have tried many orderedtests and the .trx file always shows the wrong count?
Have just started using Google Chrome , and noticed in parts of our site,
Have had to write my first proper multithreaded coded recently, and realised just how
I have a series of CodedUI test methods that make up a single test
I have a string like AxxBCyyyDEFzzLMN and I want to replace all the occurrences
We use Visual Studio 2008 and MSTest. We have a batch file that the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.