Absent Member.
Absent Member.
762 views

Modify the default report " Failed Test per Execution Plans" to get all the test executed: failed and passed ones

Hi,

I'm not really familiar with SQL command, that's maybe why I fail 😉

Nevertheless, I like to use the default report "Failed test per executions plans".  I already modify it in order to add the run comment field.

Now I would like to have the list of the passed tests also.  I tried to modify it but the result I have is that I get all the tests assigned in the execution plan.  But all the passed test cases appeared as "not executed"

Here is the SQL command

select
            etn.NodeID_pk ExecDefId,
            etn.NodeName ExecDefName,
            tpn.NodeID_pk TestDefId,
           tpn.Name TestDefName,
            tdeds.PassedCount,
            tdeds.FailedCount,
            tdeds.NotExecutedCount,
            tdeds.TestDefExecID_fk TestDefRunId,
            tdeds.IsLeaf,
            tdCount.NrAssignedTestDefs,
            count(tpn.NodeID_pk) over (partition by etn.NodeID_pk) NrNotPassedTestDefs,
            etn.ProjectID_fk ProjectId,
                    ttde.RunComment
                              
          from TM_ExecTreeNodes etn
            inner join TM_ExecTreePaths etp on etn.NodeID_pk = etp.NodeID_pk_fk
            inner join TM_V_ExecNodes_TestDefs entd on entd.ExecNodeID = etn.NodeID_pk
            inner join TM_TestPlanNodes tpn on tpn.NodeID_pk = entd.TestDefID_pk_fk
            left join TM_TestDefExecDefStatuses tdeds on tdeds.TestPlanNodeID_pk_fk = entd.TestDefID_pk_fk and tdeds.ExecTreeNodeID_pk_fk = etn.NodeID_pk
            inner join (select entd2.ExecNodeID, count(*) NrAssignedTestDefs
                        from TM_V_ExecNodes_TestDefs entd2 where entd2.PositionNumber >= 0
                        group by entd2.ExecNodeID) tdCount on tdCount.ExecNodeID = etn.NodeID_pk
                    inner join TM_TestDefExecutions ttde on TestDefExecID_pk_fk = tdeds.TestDefExecID_fk
                                               
          where tpn.ProjectID_fk = ${$PROJECTID}  AND etp.ParentNodeID_pk_fk = ${execNode_Id_0|766|ExecNodeID}  
            and etn.IsLeaf = 1
            and entd.PositionNumber >= 0
            and (tdeds.FailedCount > 0 or tdeds.PassedCount > 0 or tdeds.ExecutionTimestamp IS NULL)
          
          order by NrNotPassedTestDefs desc

 

Thanks for your help

Tags (2)
0 Likes
4 Replies
Micro Focus Expert
Micro Focus Expert

Hi Valerie,

I am not 100% sure if I fully understand your scenario but I think you should remove the condition "or tdeds.ExecutionTimestamp IS NULL" from the WHERE clause as this would add all not executed tests too.

Hope this helps,

Hubert

0 Likes
Absent Member.
Absent Member.

Hi Hubert,
Thank you for your help. I tried this one already but no effect on the query. To give you more details, the report expected is a table and one of the column is the test status. In the original report, Silk is only providing me with the failed ones. My exectation are to have all the tests executed with both status (failed and passed). When applying the query, the tests list is correct but the status for the passed ones is "not executed". Hope this is more clear.
Thanks again
Valerie
0 Likes
Cadet 2nd Class Cadet 2nd Class
Cadet 2nd Class

Hi Valerie,

the report template "Not Passed TDs per ED.rptdesign" is only intended for usage in context with failed tests, but can easily be extended to show passed tests:

I uploaded a modified version to the Media Gallery:

<EDIT - the template still did not show Passed status text - uploaded a new version>
https://community.microfocus.com/borland/test/silk_central/m/mediagallery/468
</EDIT>

Regards,
Roland Kern

0 Likes
Absent Member.
Absent Member.

Hi Roland,
Thank you for your reply. I tried to upload it in Silkcentral with no luck. I will see with the support if they can help me with this. I probably do something wrong 😉
Thanks,
Valerie
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.