Created On:  28 September 2012

Problem:

How do you retrieve information about result files of a test?

Resolution:

Information about result files of a test run is stored in the tables TM_TDE_ResultFiles and TM_ResultFiles.  You could extend an existing report query to include the names of result files in an Excel report.
 
An example query that retrieves result file information of the latest test runs of an execution plan is below, where '?' should be replaced with the required execution definition ID.
 
SELECT tpn.Name,
       rf.ResultFileID_pk,
       rf.FileName
FROM TM_ExecDefs_TestDefs edtd
  INNER JOIN TM_TestDefExecDefStatuses tdeds on tdeds.TestPlanNodeID_pk_fk = edtd.TestDefID_pk_fk
  INNER JOIN TM_TestPlanNodes tpn on tpn.NodeID_pk = edtd.TestDefID_pk_fk
  LEFT JOIN TM_TDE_ResultFiles tderf on tderf.TestDefExecID_pk_fk = tdeds.TestDefExecID_fk
  LEFT JOIN TM_ResultFiles rf on rf.ResultFileID_pk = tderf.ResultFileID_pk_fk
WHERE edtd.ExecDefID_pk_fk = ?

Below is a screenshot showing a downloaded example Excel report template.

Incident #2593546