Ranorex testing on Jenkins server

Ask general questions here.
stapes
Posts: 206
Joined: Wed Sep 16, 2015 10:55 am

Ranorex testing on Jenkins server

Post by stapes » Mon Jan 18, 2016 5:37 pm

I am finally running my tests on the Jenkins server, but neither the Android nor the IOS tests are working.

I am not getting any reports out either. I have set the Report Folder in Global Parameters.

In here, I can see the file Test_365AgilePortal_yyyymmdd_hhmmss.rxlog
and Test_365AgilePortal_yyyymmdd_hhmmss.rxlog.data_tmp

When I try to view these files, all it says is that Data transformation file is missing.

It is nigh on impossible to work out what is failing without a report, but I suspect that the server cannot see my devices, android and IOS, over the wifi.

As I can't get Ranorex Studio on here too, how do I see these devices?

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Ranorex testing on Jenkins server

Post by krstcs » Mon Jan 18, 2016 6:33 pm

In order to run tests against mobile devices, the system running the test MUST have Ranorex installed (or at least the required DLLs must be copied to the system).

If you can't install Ranorex on the Jenkins server system, then I would suggest setting up another system as a Jenkins slave, with Ranorex installed, and connecting the devices to that slave system. Then you run your Jenkins jobs for those tests on that slave system instead of the server.

In addition, when you copy the report files from their creation location to a new location, you must also copy the 3 "Ranorex5.(css/png/xsl)" files.

EDIT: I see that you named the data file "data_tmp". Ranorex cannot see that file name. The two report files must be <ReportName>.html and <ReportName>.html.data, or <ReportName>.rxlog and <ReportName>.rxlog.data. Ranorex assumes the data file's name is the exact same as the rxlog/html file's name, but with ".data" appended to the end.
Shortcuts usually aren't...

stapes
Posts: 206
Joined: Wed Sep 16, 2015 10:55 am

Re: Ranorex testing on Jenkins server

Post by stapes » Tue Jan 19, 2016 10:45 am

Sorry, that is not the answer.

I already have \Ranorex installed on my Jenkins Slave, & it works fine animating a Desktop application, but it is failing with the Android & IOS tests.
I did not name the file .data_tmp - they are coming out with that name.

The Report File specification in my Global Parameters looks like this: %S_%Y%M%D_%T.rxlog

There is no Report.name.html.data file.

stapes
Posts: 206
Joined: Wed Sep 16, 2015 10:55 am

Re: Ranorex testing on Jenkins server

Post by stapes » Tue Jan 19, 2016 10:52 am

I have attached the Report Files obtained. They are - as you see - all blank! There is no report in my report.
Attachments
RanorexReports.zip
Ranorex reports zipped folder
(189.35 KiB) Downloaded 31 times

stapes
Posts: 206
Joined: Wed Sep 16, 2015 10:55 am

Re: Ranorex testing on Jenkins server

Post by stapes » Tue Jan 19, 2016 3:50 pm

We have a different kind of License on the Jenkins server. It will not let me use Ranorex Studio?
I have 1 license on my Development PC & there is a floating license for the Jenkins Server.
So I can't do anything with Ranorex Studio or Ranorex Spy on here.

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Ranorex testing on Jenkins server

Post by krstcs » Tue Jan 19, 2016 4:09 pm

It depends on what type of license is on the Server. If it is a runtime license, then no, you cannot run Studio. I'm not sure about Spy, last I checked it was also limited to a Premium license, but there was some discussion about changing that because Spy is very useful for diagnostics.

FYI, there are 3 types of licenses:

1. Runtime floating (all runtime are floating licenses and require the Ranorex License server).
2. Premium floating (requires License server).
3. Premium node-locked (can only be used on one system).

If you have a Premium floating license on your dev box, you could shut down Ranorex Studio on your system and run it on the Server temporarily while troubleshooting.


The *.data_tmp file is the file that Ranorex saves the Report data too BEFORE if finalizes the report at the end of the test. This probably means that your test is not ending correctly and the report is not being finalized, that's why you don't have a *.data file instead.
Shortcuts usually aren't...

stapes
Posts: 206
Joined: Wed Sep 16, 2015 10:55 am

Re: Ranorex testing on Jenkins server

Post by stapes » Wed Jan 20, 2016 11:37 am

I have everything working with the Jenkins on the Slave now, but with one exception - I am still not seeing the Reports.
If I run from Ranorex Studio on the Slave machine, I see the Reports as usual.

But when I run from Jenkins Build Server, using the Build Now command - I get blank reports.

I have specified these to go to folder C:/RanorexReports on the Slave machine in the Global Parameters, and I have given Full Control to the Jenkins Service Account for this Folder - but maybe I need to give Permissions to the Anonymous user?
Maybe I need to disable UAC?

The Report File setting is %S_%Y%M%D_%T.rxlog


What could possibly be wrong?

I can see what is going on using the Console Output - maybe this is all I am going to get?

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

Re: Ranorex testing on Jenkins server

Post by odklizec » Wed Jan 20, 2016 12:56 pm

Hi,

What do you mean by "blank report"? The report file is not created or the file is created but it appears to be empty?

If the later one, then it's on 99.9% caused by IE security settings ;) To be able to view report details, there needs to be enabled scripting in IE Security Settings (in IE go to Tools, Internet Options >> Security>> Internet, Custom Level >> All Scripting setting = Enabled)...
IE_security.png
IE_security.png (48.54 KiB) Viewed 707 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

stapes
Posts: 206
Joined: Wed Sep 16, 2015 10:55 am

Re: Ranorex testing on Jenkins server

Post by stapes » Wed Jan 20, 2016 1:23 pm

Finally cracked it - it was some dodgy code I had put in long ago at the beginning of the first test suite that was preventing my reports appearing. Once I removed it - I got my Reports!

This was the dodgy code:

TestReport.Setup(ReportLevel.Info,"report.rxlog",true);
TestReport.EnableTracingScreenshots = false;
TestReport.ReportWriteInterval = 0;

Ranorex.Controls.ProgressForm.Show();

I don't rightly understand why. This may have been done at an early stage to try to address some issue, probably did nothing useful, & got left behind.