Commodore
Commodore
446 views

Query to display Execution Plan View

Jump to solution

Hi all,

What is query to get view like in Execution Plan Assigned Test? The idea is to get last status for all the test that assigned to Execution Plan.

Screenshot_13.png

0 Likes
1 Solution

Accepted Solutions
Micro Focus Expert
Micro Focus Expert

Hi @garecanbp 

 

Please paste this SQL into the advanced query of a new report:

 

SELECT tests.NodeID_pk testdefid, tests.Name TestName, tdeds.PassedCount, tdeds.FailedCount, tdeds.NotExecutedCount, tdeds.ExecutionTimestamp, tests.ProjectID_fk ProjectID
FROM TM_TestDefExecDefStatuses tdeds
INNER JOIN TM_TestPlanNodes tests ON tdeds.TestPlanNodeID_pk_fk = tests.NodeID_pk
INNER JOIN TM_V_ExecNodes_TestDefs edtd ON edtd.TestDefID_pk_fk = tdeds.TestPlanNodeID_pk_fk AND edtd.ExecNodeID = tdeds.ExecTreeNodeID_pk_fk
WHERE tdeds.ExecTreeNodeID_pk_fk = ${execProp_Id_0|0|Execution Plan ID}
ORDER BY edtd.PositionNumber

 

There are counters instead of a simple test status, the reason is it is possible to have tests with combined status too, like JUnit tests.

 

Regards,

Hubert

View solution in original post

0 Likes
3 Replies
Micro Focus Expert
Micro Focus Expert

Hi @garecanbp 

 

Please paste this SQL into the advanced query of a new report:

 

SELECT tests.NodeID_pk testdefid, tests.Name TestName, tdeds.PassedCount, tdeds.FailedCount, tdeds.NotExecutedCount, tdeds.ExecutionTimestamp, tests.ProjectID_fk ProjectID
FROM TM_TestDefExecDefStatuses tdeds
INNER JOIN TM_TestPlanNodes tests ON tdeds.TestPlanNodeID_pk_fk = tests.NodeID_pk
INNER JOIN TM_V_ExecNodes_TestDefs edtd ON edtd.TestDefID_pk_fk = tdeds.TestPlanNodeID_pk_fk AND edtd.ExecNodeID = tdeds.ExecTreeNodeID_pk_fk
WHERE tdeds.ExecTreeNodeID_pk_fk = ${execProp_Id_0|0|Execution Plan ID}
ORDER BY edtd.PositionNumber

 

There are counters instead of a simple test status, the reason is it is possible to have tests with combined status too, like JUnit tests.

 

Regards,

Hubert

View solution in original post

0 Likes
Commodore
Commodore

Thanks, @Hubert Inreiter 

Based on this query I can modify it to display the status based on the count.

0 Likes
Commodore
Commodore

Hi @Hubert Inreiter 

I found out that this query collects all runs from one Execution Plan. How can I get the last status based on the assigned test on Execution Plan?

So if I assigned 30 tests then I will get 30 data with their latest status (Passed, Failed, or Not Executed).

Thanks

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.