Hi,
Is there a way to to give a custom name rather than it taking the log name from properties?
I know we can setup log name using %S%T%D..etc
But I want to name the log file depending on the test cases am running. like eg. UseThisName.rxlog, MyTestLog.rxlog..
I tried to use "Ranorex.Core.Reporting.TestReport.ReportFilename" but am getting a warning saying it's 'obsolete and try to use TestReport.ReportEnvironment.ReportName.'
But how can I assign custom name to this property? I am getting an error saying that it is a read-only property and can't assign any value to it.
Please let me know if there is a way to use custom name for my rxlog.
Thanks.
How to customize the report rxlog file NAME.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: How to customize the report rxlog file NAME.
Hi,
I already forwarded the feature request to allow the use of the test case name as part of the report file name.
Meanwhile you can use the following code to create a report with the name of the test case:
Markus
I already forwarded the feature request to allow the use of the test case name as part of the report file name.
Meanwhile you can use the following code to create a report with the name of the test case:
TestReport.Setup(ReportLevel.Info,TestReport.ReportEnvironment.ReportFileDirectory+ "\\" + TestCase.Current.Name+".rxlog",true);Regards,
Markus
Re: How to customize the report rxlog file NAME.
Thanks Markus,
It's working.
Regards,
It's working.

Regards,
Re: How to customize the report rxlog file NAME.
I'm facing a similar problem: I want to use a global Parameter (name of the testenvironment) as suffix in the reportname. I tried the solution with Testreport.Setup, but the name of the saved reportfile did not change.
I'm using this peace of code at Setup Region of my testsuite. Maybe this is the fault, because the file was already created at this Point?!
I'm using this peace of code at Setup Region of my testsuite. Maybe this is the fault, because the file was already created at this Point?!
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: How to customize the report rxlog file NAME.
Hello bennylew,
Unfortunately, we are not able to reproduce the mentioned behavior on our machines. Please ensure that you are using our latest version, currently Ranorex 5.4.2.
Also, please note the calling the "TestReport.Setup()"-method creates an additional report and does not modify the "actual" report.
Hope this information helps.
Regards,
Robert
Unfortunately, we are not able to reproduce the mentioned behavior on our machines. Please ensure that you are using our latest version, currently Ranorex 5.4.2.
Also, please note the calling the "TestReport.Setup()"-method creates an additional report and does not modify the "actual" report.
Hope this information helps.
Regards,
Robert