Access to console log

Ranorex Studio, Spy, Recorder, and Driver.
boegvald
Posts: 62
Joined: Wed Mar 13, 2019 9:02 am

Access to console log

Post by boegvald » Fri Sep 20, 2019 8:22 am

Is there a way to access the console log after executing a test in Ranorex Studio?

I enjoy that option very much when troubleshooting tests run via Jenkins (where the console is logged and accessible). Is the console logged as well when running tests in Ranorex Studio? If so, where?

If not, anyone knows how this can be accomplished? I was considering redirecting it to a file, but that way I will not be able to see the console when executing the test.

Best Regards
Bo
Best Regards

Bo

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7470
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Access to console log

Post by odklizec » Fri Sep 20, 2019 9:10 am

Hi,

You can redirect test console to file by this command line (test app must be compiled as console app!):
Test.exe > c:\temp\ConsoleFile.txt
Sadly, I found no way to use this command line in Ranorex Studio. There is an option to set the debug command line in Project properties.
Console2File.png
But even after setting the above command line, test is always started with console window and no txt file with console output is created. So it seems that the above command line does not work, if test is started from studio?
You do not have the required permissions to view the files attached to this post.
Pavel Kudrys
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

boegvald
Posts: 62
Joined: Wed Mar 13, 2019 9:02 am

Re: Access to console log

Post by boegvald » Wed Sep 25, 2019 1:09 pm

Hi Pavel. I don't think redirecting will really give me what I was looking for, because then you can't see the command line when running tests. So, I was really looking for something like either an existing file where the console is written to, or a way to include a command (at the end of a run) that dumped the console to a file. But I better stick to Jenkins, I guess :-)

Also, when building Ranorex projects in Jenkins, I often see a lot of warnings (like if .Net verisons differ etc). Do you know if there is there a spot in studio where I can see similar warnings?
Best Regards

Bo

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7470
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Access to console log

Post by odklizec » Wed Sep 25, 2019 1:30 pm

Hi,

What's so important about seeing the console window while running the test? If you start test from Jenkins, you don't see the console window either? ;) Anyway, the log is stored also in file. Typically, it's stored here:
C:\Users\username\Documents\Ranorex\Logs\
If you don't see it there, check Ranorex Settings >> Plugins tab >> User section...
RxTraceLogs.png
Warnings you are mentioned should be displayed also in Output and Error window...
errors_warnings.png
You do not have the required permissions to view the files attached to this post.
Pavel Kudrys
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

boegvald
Posts: 62
Joined: Wed Mar 13, 2019 9:02 am

Re: Access to console log

Post by boegvald » Fri Nov 22, 2019 12:15 pm

Old thread... did not realize you replied to this one. So, sorry about the late reply. Anyway, thanks much for answer. In Jenkins I can see the console log while running the tests (and if needed login to the slave with Teamviewer and follow the tests being carried out)! But anyway, the most important part of this (for me) is to be able to troubleshoot the errors and warnings coming out of Ranorex. And I still find that difficult at times. For example:

2019-11-22 12_03_41-Refusion_Project - Ranorex Studio - (32bit).png

This waning does not give much hint about the cause of the warning. And I can't find anything in the logs mentioned. But in the Jenkins console, more information is being provided:

2019-11-22 12_05_34-Work Refusion #1996 Console [Jenkins].png

So, most often I have to setup a test with such warnings in our Jenkins environment in order to troubleshoot. One of the problems with this (besides the efforts required) is that there can be small variations in the Jenkins environment and my local environment, which sometimes cause different sets of warnings.
You do not have the required permissions to view the files attached to this post.
Best Regards

Bo