Access to console log

Ranorex Spy, Recorder, and Studio.
boegvald
Posts: 27
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

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 5187
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
Console2File.png (17.41 KiB) Viewed 68 times
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?
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: 27
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?

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 5187
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
RxTraceLogs.png (14.56 KiB) Viewed 46 times
Warnings you are mentioned should be displayed also in Output and Error window...
errors_warnings.png
errors_warnings.png (11.74 KiB) Viewed 46 times
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