hi,
currently the testcase result is reported as an rxlog-file.
I want to parse each log file, collect those results and wrap it up in a global report. However, the rxlog is no plain logfile, it uses internally javascripts ? ( if I open an rxlog, i do not see any validation checkings etc etc
How can i easely create a full parseable XML log that doesn't requires ranorex.reportviewer.exe to open it to be fully readable ?
report parser
This might help you, or not... But,
I use the Report.Setup method and actually name my report with a .XML extension so I do not have to go through the extra step of renaming it to .XML later.
I use the Report.Setup method and actually name my report with a .XML extension so I do not have to go through the extra step of renaming it to .XML later.
Code: Select all
// Setup Reporter
string LogFile = @"c:\temp\Report\H$InstallTestLog.xml";
if (Directory.Exists(@"c:\temp\Report") == false)
{
Directory.CreateDirectory(@"c:\temp\Report");
}
Report.Setup(ReportLevel.Debug, LogFile, true);
Re: report parser
It works.
Thanks Ciege.
I have it like this:
If Folder1 doesn't exist, it gets created.
Is there anyway I can change this Folder1 to DateTime format or something like that. So every time it will create a Folder containing date and time and reports will be saved inside that folder.
Thanks.
Thanks Ciege.
I have it like this:
Code: Select all
string LogfileName = @"c:\Reports\Folder1\TestReport.xml";
Is there anyway I can change this Folder1 to DateTime format or something like that. So every time it will create a Folder containing date and time and reports will be saved inside that folder.
Thanks.
Re: report parser
Sure, if you write a little code to generate a date time stamp as a sting value you can just replace folder1 with that.ohm wrote: Is there anyway I can change this Folder1 to DateTime format or something like that. So every time it will create a Folder containing date and time and reports will be saved inside that folder.
Something like this should suffice:
Code: Select all
string strYear = System.DateTime.Now.Year.ToString();
string strMonth = System.DateTime.Now.Month.ToString();
string strDay = System.DateTime.Now.Day.ToString();
string strHour = System.DateTime.Now.Hour.ToString();
string strMinute = System.DateTime.Now.Minute.ToString();
string strSecond = System.DateTime.Now.Second.ToString();
string strDateTimeStamp = strYear + "_" + strMonth + "_" + strDay + "___" + strHour + "_" + strMinute + "_" + strSecond;
string LogFile = @"c:\temp\Report\" + strDateTimeStamp + @"\MyReportName.xml";
Report.Setup(ReportLevel.Debug, LogFile, true);
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!
Ciege...
Ciege...
Re: report parser
Thank you so much Ciege.
It works perfectly. Exactly what I was looking for. I really appreciate it.
It works perfectly. Exactly what I was looking for. I really appreciate it.
Re: report parser
When I have renamed my *.rxlog to *.XML, it opens to Internet Explorer (as it should do)
But should the buttons (Log Level) in my report also work ?
But should the buttons (Log Level) in my report also work ?
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: report parser
Hi SanMan,
there's no difference between opening the ranorex log file in Report Viewer and in IE, so clicking on the report level check boxes should work fine. Have you allowed 'blocked content' (on top of the IE view) for the report '.xml' file?
Best regards,
Christian
Ranorex Team
there's no difference between opening the ranorex log file in Report Viewer and in IE, so clicking on the report level check boxes should work fine. Have you allowed 'blocked content' (on top of the IE view) for the report '.xml' file?
Best regards,
Christian
Ranorex Team
Re: report parser
Excellent! Works very well. Thank you!