Hello Users,
I want to print 'Passed' instead 'Success' on Ranorex Report Header after i executing single recording/code module as shown in attached file. And I have followed steps at https://www.ranorex.com/blog/customizin ... x-reports/ but not succeed so please help me out ASAP.
Appreciate any reply.
Thanks in advance
Siva
Print 'Passed' instead 'Success' on Ranorex Report Header
Print 'Passed' instead 'Success' on Ranorex Report Header
- Attachments
-
- Rx Report Image.png (59.67 KiB) Viewed 741 times
Re: Print 'Passed' instead 'Success' on Ranorex Report Header
Hello Ranorex Support Team,
Please provide support for above.
Thanks in advance.
Please provide support for above.
Thanks in advance.
- Support Team
- Site Admin
- Posts: 12167
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Graz, Austria
Re: Print 'Passed' instead 'Success' on Ranorex Report Header
Hello Sai,
At this time, this text cannot be modified through normal means. I recommend creating a new feature request on our User Voice platform as I can see this being a useful feature. It means more when the request comes from you directly than from me.
Although, since the report data file containing the test result is an XML file, we can edit this file and modify the "result" attribute to whatever we want. Note, this is not supported and has not been thoroughly tested - use at your own risk.
ModifyStatus Code Module
Note, for this to work, we must call Report.End(), which ends the reporting and will not allow you to add anything new. Because of this, ensure this is the last thing executed in your code module.
Alternatively, you can manually edit the ReportFile.rxlog.data file from "Success" to "Passed".
ReportFile.rxlog.data I hope this helps!
Cheers,
Ned
At this time, this text cannot be modified through normal means. I recommend creating a new feature request on our User Voice platform as I can see this being a useful feature. It means more when the request comes from you directly than from me.
Although, since the report data file containing the test result is an XML file, we can edit this file and modify the "result" attribute to whatever we want. Note, this is not supported and has not been thoroughly tested - use at your own risk.
ModifyStatus Code Module
Code: Select all
using System.Xml; //Add to using statments
//Change Success to Passed
Report.End();
string dataFilePath = Ranorex.Core.Reporting.TestReport.ReportEnvironment.ReportDataFilePath;
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load(dataFilePath);
XmlNodeList allActivities = xmlDoc.GetElementsByTagName("activity");
foreach (XmlNode activity in allActivities)
if (activity.Attributes["result"].Value.Equals("Success"))
activity.Attributes["result"].Value = "Passed";
xmlDoc.Save(dataFilePath);
Alternatively, you can manually edit the ReportFile.rxlog.data file from "Success" to "Passed".
ReportFile.rxlog.data I hope this helps!
Cheers,
Ned