Hi,
I'm new in Ranorex and like to know if there is a way to use varibales in the Report file names?
Background:
We want to automate our hardware-product final tests, so we need to assign the product s/n to the report.
Possibilty to use variables in Report files name?
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Possibilty to use variables in Report files name?
Hi MiHa and welcome to the Ranorex forum,
Unfortunately the Ranorex Report does only allow the following variables when executed via Test Suite
More information about the different command line arguments can be found in our User Guide
Regards,
Markus (S)
Unfortunately the Ranorex Report does only allow the following variables when executed via Test Suite
- %T Time
%D Day
%M Month
%Y Year
%L Run Label
%C Run Config Name
%H Host Name
%S Test Suite Name
%X Test Suite Result
More information about the different command line arguments can be found in our User Guide
Regards,
Markus (S)
Re: Possibilty to use variables in Report files name?
Hi Support Team,
I have seen these variables, but the needed input were generated in the test.
Is it possible to modify the "%L" variable and what does this variable include as default?
Otherwise can I rename the reportfiles at the "TearDown" Section with a test variable?
I have seen these variables, but the needed input were generated in the test.
Is it possible to modify the "%L" variable and what does this variable include as default?
Otherwise can I rename the reportfiles at the "TearDown" Section with a test variable?
Re: Possibilty to use variables in Report files name?
Hi,
I don't know about %L variable, but I have a good experience with renaming the rxzlog file name via code. You just need to perform below actions as very last actions in program.cs:
I don't know about %L variable, but I have a good experience with renaming the rxzlog file name via code. You just need to perform below actions as very last actions in program.cs:
Code: Select all
Ranorex.Core.Reporting.TestReport.EndTestCase();
Ranorex.Core.Reporting.TestReport.SaveReport();
// get rxzlog path
string zipFilePath = Ranorex.Core.Reporting.TestReport.ReportEnvironment.ReportZipFilePath;
// add custom string to report file name
string customString = "blablabla";
if (System.IO.File.Exists(zipFilePath))
{
string zipFilePath_new = Ranorex.Core.Reporting.TestReport.ReportEnvironment.ReportFileDirectory + "\\" + Ranorex.Core.Reporting.TestReport.ReportEnvironment.ReportName + "_" + customString + ".rxzlog";
System.IO.File.Move(zipFilePath, zipFilePath_new);
}
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
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