Adding custom properties to item in rxlog.data

Ask general questions here.
uthappa
Posts: 2
Joined: Fri Sep 14, 2018 11:07 am

Adding custom properties to item in rxlog.data

Post by uthappa » Tue Sep 18, 2018 11:31 am

Hi,
I would like to add additional properties to item inside an activity. Can this be achieved in Ranorex.
Ex : The below is the default item Template generated by Ranorex,

Code: Select all

<item timeRelativeToTestSuiteStartTime="00:17.553"
								timeRelativeToTestModuleStartTime="00:03.118"
								timeWallClock="11:35:42"
								time="00:17.553"
								level="TestMethod"
								category="User">
								<message>
									Test Method Name
								</message>
								<metainfo
									codefile="d:\olympus\automation\Admin.MasterItemList\HelperClass\MasterItemListCommon.cs"
									codeline="54"
									loglvl="TestMethod">
								</metainfo>
							</item>
What i want to achieve is shown below,

Code: Select all

<item
								timeRelativeToTestSuiteStartTime="00:17.553"
								timeRelativeToTestModuleStartTime="00:03.118"
								timeWallClock="11:35:42"
								time="00:17.553"
								level="TestMethod"
								category="User" 
								[b]Message3="Test Method for Message 2"[/b]>
								<message>
									Test Method Name
								</message>
								[b]<message2>
									Test Method for Message 2
								</message2>[/b]
								<metainfo
									codefile="d:\olympus\automation\Admin.MasterItemList\HelperClass\MasterItemListCommon.cs"
									codeline="54"
									loglvl="TestMethod">
								</metainfo>
							</item>
Is there a way i can add any of the bold message above.

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

Re: Adding custom properties to item in rxlog.data

Post by Support Team » Tue Sep 18, 2018 6:38 pm

Hi Uthappa,

There is no built-in way to do this at this time and I advise against modifying the Ranorex Test Suite file manually since it is an autogenerated file that you may make corrupt. I recommend storing any additional information elsewhere, such as your own XML file.

If you would like to see this feature added to Ranorex, I recommend creating a new feature request on our User Voice platform. It means more when the request comes from you directly than from me.

Kind Regards,
Ned
.
Image

Shakib
Posts: 31
Joined: Tue Jan 06, 2015 7:22 am

Re: Adding custom properties to item in rxlog.data

Post by Shakib » Fri Sep 21, 2018 2:31 pm

Hi Uthappa,

Anything you can add in rxlog.data with the help of xslt file.
You need to check from where this method name is coming through .xslt file and do the modification there.
If you want to add any message before the method name then just hard code the string in xslt file from where the method name is displaying.


Regards,
Shakib