How to add Test Case Filter

Ranorex Spy, Recorder, and Studio.
ElenaC
Posts: 6
Joined: Mon Feb 17, 2014 7:52 pm

How to add Test Case Filter

Post by ElenaC » Mon Feb 17, 2014 8:00 pm

Hi
Is there any way I can add my own Test Case Filter?
I found the way to add it only in XSL and I have a chechbox in report, but how can use it now from Ranorex Studio?

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: How to add Test Case Filter

Post by Support Team » Thu Feb 27, 2014 1:52 pm

Hello ElenaC,

In order to create a new Test Case filter you just need to add a new custom Report level to your solution.
A detailed description on how to do so can be found here

The TestCase filter within the Report will be created automatically after adding the custom Report level.

Regards,
Robert
.
Image

ElenaC
Posts: 6
Joined: Mon Feb 17, 2014 7:52 pm

Re: How to add Test Case Filter

Post by ElenaC » Mon Mar 17, 2014 10:08 am

Hi
The question is how can i add the filter on the top, for example, in the attachment i marked with green
the level you answered me about. I marked with red the level i'm asked about.
Thanks
Attachments
Report.jpg
Report
Report.jpg (110.73 KiB) Viewed 1706 times

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: How to add Test Case Filter

Post by Support Team » Mon Mar 17, 2014 11:49 am

Hello ElenaC,

Unfortunately you mixed something up. Please add a new custom Report level to your solution:
Ranorex.ReportLevel MyNewReportLevel = new ReportLevel("My low Report Level", 25, null);  
Ranorex.Report.Log (MyNewReportLevel, "This is unimportant information");
ReportWithCustomFilter.png
ReportWithCustomFilter.png (7.41 KiB) Viewed 1704 times
The custom filter is automatically generated and added to your report as shown above.

Regards,
Robert
.
Image

ElenaC
Posts: 6
Joined: Mon Feb 17, 2014 7:52 pm

Re: How to add Test Case Filter

Post by ElenaC » Wed Mar 19, 2014 1:40 pm

HI
Yes i have added my own level exactly like this
2.jpg
2.jpg (62.04 KiB) Viewed 1691 times
But my question is: when i have a lot of itertions and my filter level appears in iteration inside, but i want it to appear in the main filter on the top - the main filter. I want to filter only specified iterations (that have my filter level inside) How can i do it?
Because by default there is only Seccuss Failed and Blocked:
1.jpg
report
1.jpg (58.19 KiB) Viewed 1691 times

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: How to add Test Case Filter

Post by Support Team » Wed Mar 19, 2014 4:31 pm

Hi ElenaC,

I’m sorry that I misunderstood your problem.
In order to disable the messages from a custom report level you have to add following code to your *.xsl file:
<xsl:template name ="globalCategorySelector">
     <div class="filter">
         <span>Test Case Filter:</span>
         <input type="checkbox" id="checkBoxTestCaseSuccess" name="checkBoxTestCaseSuccess" onClick="OnFilter(this,['li.Success'])" checked="1"/> <label for="checkBoxTestCaseSuccess">Success</label>
         <input type="checkbox" id="checkBoxTestCaseFailed" name="checkBoxTestCaseFailed" onClick="OnFilter(this,['li.Failed','li.Active'])" checked="1" /> <label for="checkBoxTestCaseFailed">Failed</label>
         <input type="checkbox" id="checkBoxTestCaseIgnored" name="checkBoxTestCaseIgnored" onClick="OnFilter(this,['li.Ignored'])" checked="1" /> <label for="checkBoxTestCaseIgnored">Blocked</label>
		 
		 <!-- Please add your custom filter here !!! -->
		 <xsl:if test=".//item[@level='My low Report Level']">
				<xsl:call-template name="levelFilterCheckbox">
					<xsl:with-param name="level" select=".//item[@level='My low Report Level']" />
				</xsl:call-template>
			</xsl:if>   
 
     </div>
 </xsl:template>
Regards,
Robert
.
Image

ElenaC
Posts: 6
Joined: Mon Feb 17, 2014 7:52 pm

Re: How to add Test Case Filter

Post by ElenaC » Wed Apr 02, 2014 2:48 pm

Ok,
Thanks a lot, it really makes disable to all log levels i want. :)

And another one question:
As i understand, the status of iteration can be success, failed or blocked.
Can i change it, add another one status to filter iterations?
For example, I have a crash of application inside of iteration, and i want to find specified iteration where it is appear.
For now i have "Crash" as a log level, and to find all crashes i need to open all iterations and pass through each one.
Is there any way i can give status to iteration (not failed) where was the crash and filter it ?
As a result i would like to get only iterations where was a crash.

Thanks

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: How to add Test Case Filter

Post by Support Team » Mon Apr 07, 2014 8:22 am

Hello ElenaC,

Unfortunately it’s not possible to define a customized iteration status.
Thank you for your understanding.

Regards,
Robert
.
Image