Page 1 of 1

Ranorex testing on Jenkins server

Posted: Mon Jan 18, 2016 5:37 pm
by stapes
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?

Re: Ranorex testing on Jenkins server

Posted: Mon Jan 18, 2016 6:33 pm
by krstcs
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.

Re: Ranorex testing on Jenkins server

Posted: Tue Jan 19, 2016 10:45 am
by stapes
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.

Re: Ranorex testing on Jenkins server

Posted: Tue Jan 19, 2016 10:52 am
by stapes
I have attached the Report Files obtained. They are - as you see - all blank! There is no report in my report.

Re: Ranorex testing on Jenkins server

Posted: Tue Jan 19, 2016 3:50 pm
by stapes
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.

Re: Ranorex testing on Jenkins server

Posted: Tue Jan 19, 2016 4:09 pm
by krstcs
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.

Re: Ranorex testing on Jenkins server

Posted: Wed Jan 20, 2016 11:37 am
by stapes
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?

Re: Ranorex testing on Jenkins server

Posted: Wed Jan 20, 2016 12:56 pm
by odklizec
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

Re: Ranorex testing on Jenkins server

Posted: Wed Jan 20, 2016 1:23 pm
by stapes
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.