Created On:  06 November 2012

Problem:

We are able to export the manual testcases which are not mapped with automated flag.  We have found that when we are mapping these testcases with automated flag, the manual testcases are not getting exported. Only columns of mapping are displayed.

Resolution:

Please see the TestManager help document.

On page 198, on the topic "Test Export-Update and Import", TestManger export/import functionality is limited to manual tests.

Therefore, Manual Tests that have been converted to Automated Tests will not be exported.

To export the Manual Tests that have been converted to Automated Tests, create a new report from the Report tab that performs the export using the sql query below.

Note that Automated Tests usually do not contain test steps, but because these are manual tests that have been converted to an automated test, test steps may exist.  In order to get the test step details in the report for each test, we need to know the TestType of the TestDefinition.  For manual tests this value is '_ManualTestType', however for SilkTest test types this value is 'plugin.SilkTest', and other test types have their own values.  As you can see the test type value is different for each of the test types, and if your Test Folder contains different test types, then the sql query can become complicated.  Therefore, to make the sql query simpler, the query below has been set to report on all test types.

SELECT td.TestName AS "Test Definition Name",
  td.Description AS "Test Definition Description",
  td.PlannedTime AS "Planned Time",
  ms.Name AS "Step Name",
  ms.Description AS "Step Descr",
  ms.Result AS "Step Result Info",
  td.TestID ManualTestDefID,
  ms.StepID_pk AS StepID
 
  FROM (SELECT t.NodeID_pk AS TestID, t.Name AS TestName, t.Description, t.PlannedTime,
        CASE WHEN td.IsDataDrivenInstance=1 THEN t.ParentNodeID_fk
          ELSE (CASE WHEN t.CloneNodeID_fk is not Null THEN t.CloneNodeID_fk
                  ELSE t.NodeID_pk END)
        END AS DefinitionID, td.*
        FROM TM_TestPlanNodes t
           INNER JOIN TM_TestDefinitions td
             ON (t.NodeID_pk = td.TestPlanNodeID_pk_fk) AND td.TestType <> ''
           INNER JOIN TM_PlanTreePaths ptp ON (t.NodeID_pk = ptp.NodeID_pk_fk)
        WHERE t.ProjectID_fk=${$PROJECTID}
        AND ptp.ParentNodeID_pk_fk=${parentFolderId|0|Parent Folder ID}
  ) td
  LEFT JOIN TM_ManualSteps ms ON (td.TestID = ms.TestAssetNodeID_fk)
  WHERE td.IsRegularTestDefinition = 1
  ORDER BY ManualTestDefID

The above query takes a parameter which is the Test Folder ID that contains all the tests (both manual and automated).

To use the above query in a report:

1) Create a new report and select the Advanced Query button
2) Copy and paste the above report in the Advanced Query textarea.
3) Compile the report.
4) Go to the 'Parameters' tab and specify the Test Folder ID containing the tests.
5) Select the 'Data' tab to view the results.

You can also download this report as an Excel report template from the reports 'Properties' tab.