Forum Discussion

zgibanez's avatar
zgibanez
Occasional Contributor
3 years ago
Solved

TestExecute and Azure Pipelines: Understanding and upgrading test result format

Hi there,

 

I have set up a Pipeline as part of a build. The test is executed successfully on the self-hosted agent, which has a TestExecute license and a ".trx" file is produced.

 

I have noticed that this file is very scarce in content. Regarding the individual tests, I can only gather the outcome and test duration.

See the example below, most of the information is made up of identifiers.

 

<?xml version="1.0" encoding="utf-8"?>
<TestRun id="f20edbe2-19c8-485f-85fd-c3fd3a76de11" name="XXXXX 2023-05-22 09:07:42" runUser="XXXXXX" xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2010">
  <Times creation="2023-05-22T09:07:42.3114566+02:00" queuing="2023-05-22T09:07:42.3114566+02:00" start="2023-05-22T09:07:16.1427079+02:00" finish="2023-05-22T09:07:46.3304395+02:00" />
  <TestSettings name="default" id="bcc38cab-07e3-4179-9708-f8d4e64eb4f4">
    <Deployment runDeploymentRoot="buildserver_XXX_2023-05-22_09_07_42" />
  </TestSettings>
  <Results>
    <UnitTestResult executionId="da6d90e9-e78d-4dfc-bc35-6c0423463656" testId="5b32f886-8953-8e58-5cce-00235d5daff7" testName="Launch application" computerName="XXX" duration="00:00:18.1977103" startTime="2023-05-22T09:07:22.7142290+02:00" endTime="2023-05-22T09:07:40.9119393+02:00" testType="13cdc9d9-ddb5-4fa4-a97d-d965ccfc6d4b" outcome="Passed" testListId="8c84fa94-04c1-424b-9868-57a2d4851a1d" relativeResultsDirectory="da6d90e9-e78d-4dfc-bc35-6c0423463656" />
  </Results>
  <TestDefinitions>
    <UnitTest name="Launch application" storage="XXXX" id="5b32f886-8953-8e58-5cce-00235d5daff7">
      <Execution id="da6d90e9-e78d-4dfc-bc35-6c0423463656" />
      <TestMethod codeBase="XXX\Suite.pjs" adapterTypeName="executor://tctestexecutor/v2" className="AppSuite" name="XXX" />
    </UnitTest>
  </TestDefinitions>
  <TestEntries>
    <TestEntry testId="5b32f886-8953-8e58-5cce-00235d5daff7" executionId="da6d90e9-e78d-4dfc-bc35-6c0423463656" testListId="8c84fa94-04c1-424b-9868-57a2d4851a1d" />
  </TestEntries>
  <TestLists>
    <TestList name="Results Not in a List" id="8c84fa94-04c1-424b-9868-57a2d4851a1d" />
    <TestList name="All Loaded Results" id="19431567-8539-422a-85d7-44ee4e166bda" />
  </TestLists>
  <ResultSummary outcome="Completed">
    <Counters total="1" executed="1" passed="1" failed="0" error="0" timeout="0" aborted="0" inconclusive="0" passedButRunAborted="0" notRunnable="0" notExecuted="0" disconnected="0" warning="0" completed="0" inProgress="0" pending="0" />
  </ResultSummary>
</TestRun>

 

I have some questions regarding this file and in general what can I expect from testExecute:

1) First, where can I find a format guide for `.trx` files? 

2) Can I customize it to include custom metrics? I'm pondering if this a suitable format for aggregating a database of test results

3) Is it possible to obtain a more full-fledged result format as with TestComplete logs? So a html zip with screenshots, expected and actual results, etc

 

Thank you!