Any way to completely remove blocked testcases from report?

Ask general questions here.
mrt
Posts: 257
Joined: Mon Mar 16, 2020 11:31 am

Any way to completely remove blocked testcases from report?

Post by mrt » Tue Jan 24, 2023 5:15 pm

Dear all,

is there any way to completely remove the blocked test cases from the report?

I know there is this (quite) new checkbox on top to at least post-hide the blocked testcases from the rxlog report:
but this does not update the pie chart on top nor does it help for PDF reports.
report.png

In terms of reusability I have several conditions on test cases, so on a full run it likely ends up on more test cases being blocked than are proper executed, which just does not look good on the report.

I can understand the idea to "not wanting to hide" blocked executions, but in my case I know what I am doing, everything runs fine and I just want to keep em off the report.
So if there is any custom report adjustment or dirty hack available, I would love to hear about it.

Thanks, BR mrt
You do not have the required permissions to view the files attached to this post.

mrt
Posts: 257
Joined: Mon Mar 16, 2020 11:31 am

Re: Any way to completely remove blocked testcases from report?

Post by mrt » Wed May 10, 2023 1:52 pm

I found a way by using a custom report template:
https://www.ranorex.com/help/latest/ran ... omization/

round about line 115 in RanorexReport.xsl the section for the pie chart starts:

Code: Select all

                                    <!-- PIECHART -->
                                    <xsl:if test="not(@testentry-activity-type = 'testmodule')">
                                        <h3 id="testCasesHeader">Test case result summary</h3>
                                        <div id="testCasesPie">
                                            <xsl:attribute name="totalsuccesstestcasecount">
                                                <xsl:value-of select="@totalsuccesstestcasecount" />
                                            </xsl:attribute>
                                            <xsl:attribute name="totalfailedtestcasecount">
                                                <xsl:value-of select="@totalfailedtestcasecount" />
                                            </xsl:attribute>
                                            <xsl:attribute name="totalblockedtestcasecount">
                                                <!-- <xsl:value-of select="@totalblockedtestcasecount" /> -->
                                        	<xsl:value-of select="0" />
                                            </xsl:attribute>
                                        </div>
                                    </xsl:if>
where I replaced

Code: Select all

 <xsl:value-of select="@totalblockedtestcasecount" />
with

Code: Select all

 <xsl:value-of select="0" />
This results in no blocked test cases listed at all in the report.