log making

Ranorex Studio, Spy, Recorder, and Driver.
paracelsus
Posts: 25
Joined: Thu Feb 26, 2009 3:21 pm

log making

Post by paracelsus » Wed Mar 04, 2009 3:35 pm

How can I make in the code that all steps and their results wrote a external log file?

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Post by Support Team » Wed Mar 04, 2009 4:44 pm

Hi,

Please use the Report.Setup method to specify an other location of your Ranorex log file as follows:

Code: Select all

string logFileName = @"C:\MyFolder\Logs\Test.rxlog";
Report.Setup(ReportLevel.Info, logFileName, true);
Unfortunately, there is a bug when you've opened Ranorex Studio during test execution causing an automatic move of the generated log file into the Ranorex standard Report folder.

We will fix this issue with the version.

kind regards,

Christoph,
Ranorex Support Team

paracelsus
Posts: 25
Joined: Thu Feb 26, 2009 3:21 pm

testlog

Post by paracelsus » Thu Mar 05, 2009 8:43 am

Unfortunately, it didn't help me. I put the log file to an other Folder, but the test page is blank, again! What can I do?

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Post by Support Team » Thu Mar 05, 2009 9:26 am

Please read the following forum post that should answer your question:
http://www.ranorex.com/forum/rxlog-t685.html

Regards,
Alex
Ranorex Support Team

paracelsus
Posts: 25
Joined: Thu Feb 26, 2009 3:21 pm

Post by paracelsus » Fri Mar 06, 2009 11:03 am

I try to this, but the logsheet is blank again.

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Post by Support Team » Fri Mar 06, 2009 11:20 am

As far as I understood from your last posts you're able to configure an external Ranorex Report file within a Ranorex Studio project. Am I right?

Did you try to open the generated file within Ranorex Studio or externally?

Could you please provide me with some of your code describing your steps like the following:

Code: Select all

Report.Setup(ReportLevel.Info, logFileName, true);
Report.Info("hello");
Report.End();
kind regards,

Christoph,
Ranorex Support Team

paracelsus
Posts: 25
Joined: Thu Feb 26, 2009 3:21 pm

rxlog

Post by paracelsus » Fri Mar 06, 2009 12:35 pm

This is my code:

Dim logFileName As String = "C:\Logs\test_posta.rxlog"
m_xmld = New XmlDocument()
m_xmld.Load("C:\xmltest.xml")
m_nodelist = m_xmld.SelectNodes("/test/auto")
report.SystemSummary()
report.Setup(ReportLevel.Info, logFileName, true)
report.Screenshot()

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Post by Support Team » Fri Mar 06, 2009 3:06 pm

You should call Report.Setup first or SystemSummary will not be saved in the file.

Code: Select all

report.Setup(ReportLevel.Info, logFileName, true)
report.SystemSummary()
report.Screenshot()
I cant`t reproduce your issue.
Which version of Ranorex 2.0 to you use?

Regards,
Christian,
Ranorex Support Team

paracelsus
Posts: 25
Joined: Thu Feb 26, 2009 3:21 pm

rxlog

Post by paracelsus » Fri Mar 06, 2009 3:18 pm

I use the 2.0.0.5474 version. Now I put the Report.Info("category","message") line after each step, and so the report sheet is correct, but I think it's not the best solution.

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: rxlog

Post by Support Team » Mon Mar 09, 2009 9:41 am

paracelsus wrote:Now I put the Report.Info("category","message") line after each step, and so the report sheet is correct, but I think it's not the best solution.
And what do you think is a "better solution"? We are keen on getting to know what our customers think that we can do to enhance our product :-)

Regards,
Alex
Ranorex Support Team

paracelsus
Posts: 25
Joined: Thu Feb 26, 2009 3:21 pm

best solution :D

Post by paracelsus » Mon Mar 09, 2009 11:21 am

I think that a good test framework make an extended and complete log sheet, whitout I wrote code after each step. (Like mercury quick test pro)

User avatar
Ciege
Posts: 1336
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Post by Ciege » Mon Mar 09, 2009 4:31 pm

I'm going to stand up for Ranorex on this one. Quite honestly I like the ability to log information, debug, warning, success and failure comments at any point I want to.
I've used other automation tools (Robot, RFT, QTP, etc...). I understand their ability to automatically add comments to the log, but sometimes it was not what I wanted. I would have to turn the logging feature off when I didn’t want those log comments. Now, with Ranorex, I have complete control over what gets into the log and what doesn't.