Change Test Case / Smart Folder Name

Ask general questions here.
cbelet
Posts: 6
Joined: Thu Nov 17, 2016 5:06 pm

Change Test Case / Smart Folder Name

Post by cbelet » Thu Aug 03, 2017 11:02 am

Hi guys,

I'd like to know if there is a possibility to modify a TestCase name (or SmartFolder name) dynamically (by C# code)?

My configuration: Ranorex 7.1.0 (W7)

Currently, I execute the same "SmokeTest" for a bunch of different configurations (with a Data source). Problem is, the report displays always the same "title" for each iteration. It would be nice to be able to rename or cursomize the name into the report to show for which iteration the name of the configuration.

Sorry if my question sounds stupid :-) and thanks for your help.

Cédric Belet
Attachments
Screen Shot 08-03-17 at 12.01 PM.PNG
Report
Screen Shot 08-03-17 at 12.01 PM.PNG (31.71 KiB) Viewed 530 times

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3916
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Change Test Case / Smart Folder Name

Post by odklizec » Thu Aug 03, 2017 11:32 am

Hi,

This can be achieved by modifying report stylesheet file. In the test suite settings, create new custom report template (as described >here<). Then go to custom report template folder and replace RanorexReport.xsl with the one attached to this post (eventually make a backup copy of the original one). Now if you run the test, report will display iteration number and actual iteration value from first data connector column...
report_iteration_name.png
report_iteration_name.png (6.82 KiB) Viewed 528 times
.
You can of course modify the stylesheet according your needs (just edit the template block between <!-- added by PKu - start --> and <!-- added by PKu - end --> comments). Hope this helps?
Attachments
RanorexReport.zip
(7.44 KiB) Downloaded 26 times
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

cbelet
Posts: 6
Joined: Thu Nov 17, 2016 5:06 pm

Re: Change Test Case / Smart Folder Name

Post by cbelet » Thu Aug 03, 2017 12:09 pm

Thanks a lot. It's just what I needed.
Have a nice day ahead.