cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

test result verdict in report

SK_10006408
4-Participant

test result verdict in report

As per this thread, related issue:

 

@mrump 

Hi,

Is it possible to display the field values of test steps in test session report even if the verdict field is empty 

ACCEPTED SOLUTION

Accepted Solutions
kjain2
14-Alexandrite
(To:SK_10006408)

Hi @SK_10006408 ,

 

First of all i have realized there are many thread you made on same question, would be very helpful if you close other thread and continue on one may be here only. Otherwise it's very confusing to understand which is latest and active thread.

About your request as far as i understood in your request you only see test cases having verdict and you can extract test steps for these i hope so. But your question is you want to display other test cases also from that test session into report along with test steps even though there is no verdict. Right? Correct me if am wrong.

First of all, mechanism of test session report is bit different and <%begintestresultdetail%> will give you test cases where you have verdict. These test cases are also displayed in Test Results tab. So from here you can process at least those test cases where you have verdict and also you have other information too like annotation, result, Test Steps etc.

 

Now let's consider your Test Session total contains 50 test cases and out of 50 only 30 has verdict but rest 20 are without any result(verdict). So with above way which i guess you already tried as well you have already processed these 30 and now issue is only with remaining 20 and for these 20 test cases you can try below way:-

<%beginrelationshipsdetail Query[(walktestsession[<%<%builtin ID%>%>])]%>
<td><a href="<%hosturl%>im/WebClient?IssueID=<%Relationship ID%>"><%Relationship ID%></a></td>
<td><%Relationship Category%></td>
<td><%Relationship Text%></td>
<td><%Relationship Expected Results%></td>
</tr>
<%beginrelationshipsdetailL2 <%builtin Test Steps%>%><%filter%>(item is teststep)<%endfilter%>
<tr>
<td class="level4_indent"><a href="<%hosturl%>im/WebClient?IssueID=<%RelationshipL2 ID%>"><%RelationshipL2 ID%></a></td>
<td class="level4"><%RelationshipL2 Type%></td>
<td class="level4"><%RelationshipL2 Description%></td>
<td class="level4">&nbsp;</td>
</tr>
<%endrelationshipsdetailL2%>
<%endrelationshipsdetail%>

This will also give you all 50 test cases again but you need to do bit of javascript coding to identify which you have already processed (30 with verdict) and here only remaining 20 need to be processed. (Hint:- Try to put Verdict value empty in report for these test cases.)

This is how you can try and hope it will help you. Feel free to ask question. 

I will wait for your feedback whether it works for you not.

Vielen Dank / Many Thanks,
Kapil Jain

View solution in original post

4 REPLIES 4

Hi @SK_10006408 ,

there is a document tag for the result of teststeps

<%begintestresultstepdetailL#%> <%teststep <field> %> <%endtestresultstepdetailL#%>
Reports on test step information for a test result, with test step field tags placed between tags.
The field tag can be one of the following: Step ID, Annotation, Result, Modified By, Modified Date.
Must specify L# for each relationship level, except for first level, for example:
First level would be: <%begintestresultstepdetail%>.
Second level would be: <%begintestresultstepdetailL2%>.

 

 

And you can "navigate" the TESTSTEPS relationship from a Testcase to its steps to read out the Step fields.

 

So theoretically this should be possible, but to be honest - I never tried yet.

 

And as always there might be a hidden restriction as well (see Accessing-related-Test-result-in-defect-report ) .

 

Good luck and share you experience.

 

Regards Matthias 

 

SK_10006408
4-Participant
(To:mrump)

hi,

i have tried it by navigating through test cases .. but the problem is i wont able fetch result, annotation values so i need to combine <beginrelationshipdetail> and <beginteststepreultdetail> as below snap

SK_10006408_0-1646295617043.png

but the problem is verdict value is taking default for other ids wer  there is no verdict for those ids.

SK_10006408_1-1646295712074.png

To solve this problem i have tried use javascript logic by storing the verdict value as key-value pair using map but am not able return those values to tag <td>  you have any idea on this issue 

 

if you any idea please let me know... it will be very helpfull for me to solve this issue...

thank you.

 

kjain2
14-Alexandrite
(To:SK_10006408)

Hi @SK_10006408 ,

 

First of all i have realized there are many thread you made on same question, would be very helpful if you close other thread and continue on one may be here only. Otherwise it's very confusing to understand which is latest and active thread.

About your request as far as i understood in your request you only see test cases having verdict and you can extract test steps for these i hope so. But your question is you want to display other test cases also from that test session into report along with test steps even though there is no verdict. Right? Correct me if am wrong.

First of all, mechanism of test session report is bit different and <%begintestresultdetail%> will give you test cases where you have verdict. These test cases are also displayed in Test Results tab. So from here you can process at least those test cases where you have verdict and also you have other information too like annotation, result, Test Steps etc.

 

Now let's consider your Test Session total contains 50 test cases and out of 50 only 30 has verdict but rest 20 are without any result(verdict). So with above way which i guess you already tried as well you have already processed these 30 and now issue is only with remaining 20 and for these 20 test cases you can try below way:-

<%beginrelationshipsdetail Query[(walktestsession[<%<%builtin ID%>%>])]%>
<td><a href="<%hosturl%>im/WebClient?IssueID=<%Relationship ID%>"><%Relationship ID%></a></td>
<td><%Relationship Category%></td>
<td><%Relationship Text%></td>
<td><%Relationship Expected Results%></td>
</tr>
<%beginrelationshipsdetailL2 <%builtin Test Steps%>%><%filter%>(item is teststep)<%endfilter%>
<tr>
<td class="level4_indent"><a href="<%hosturl%>im/WebClient?IssueID=<%RelationshipL2 ID%>"><%RelationshipL2 ID%></a></td>
<td class="level4"><%RelationshipL2 Type%></td>
<td class="level4"><%RelationshipL2 Description%></td>
<td class="level4">&nbsp;</td>
</tr>
<%endrelationshipsdetailL2%>
<%endrelationshipsdetail%>

This will also give you all 50 test cases again but you need to do bit of javascript coding to identify which you have already processed (30 with verdict) and here only remaining 20 need to be processed. (Hint:- Try to put Verdict value empty in report for these test cases.)

This is how you can try and hope it will help you. Feel free to ask question. 

I will wait for your feedback whether it works for you not.

Vielen Dank / Many Thanks,
Kapil Jain

SK_10006408
4-Participant
(To:kjain2)

hi,

i have tried it by navigating through test cases .. but the problem is i wont able fetch result, annotation values so i need to combine <beginrelationshipdetail> and <beginteststepreultdetail> like

 

 

<%beginrelationshipsdetail Query[(walktestsession[<%<%builtin ID%>%>])]%>

<td><a href="<%hosturl%>im/WebClient?IssueID=<%Relationship ID%>"><%Relationship ID%></a></td>
<td><%Relationship Category%></td>
<td><%Relationship Text%></td>
<td><%Relationship Expected Results%></td>
</tr>
<%beginrelationshipsdetailL2 <%builtin Test Steps%>%><%filter%>(item is teststep)<%endfilter%>
<tr>
<td class="level4_indent"><a href="<%hosturl%>im/WebClient?IssueID=<%RelationshipL2 ID%>"><%RelationshipL2 ID%></a></td>
<td class="level4"><%RelationshipL2 Type%></td>
<td class="level4"><%RelationshipL2 Description%></td>
<td class="level4">&nbsp;</td>

<%beginteststepreultdetail%>

<td class="level4"><%teststep result%></td>

<%endteststepresultdetail%>

</tr>

<%endrelationshipsdetailL2%>
<%endrelationshipsdetail%>

 

but the problem is verdict value is taking default for other ids wer  there is no verdict for those ids.

To solve this problem i have tried use javascript logic by storing the verdict value as key-value pair using map but am not able return those values to tag <td>  you have any idea on this issue 

 

if you any idea please let me know... it will be very helpfull for me to solve this issue...

thank you.

 

Announcements


Top Tags