Hi Dojo,
I am running a Ranorex test using a jenkins pipeline which used to succeed, however last time I ran it I noticed that no report / an empty report was generated.
The test itself seems to have run fine if I check the console output, but this is quite annoying to check it this way.
Would this be a known issue?
Thanks in advance.
Hi Maxim, this is an issue in Ranorex we recently discovered in Ranorex version 10.5.1 and reported to Ranorex. I currently have no information if this also occurs with other versions of Ranorex.
This issue occurs if you start a Ranorex script from command line, e.g. from a Jenkins pipeline, and pass a number of arguments using the /pa modifier to fill in some of the global parameters in your test. If one on the argument names passed with a /pa argument does not have a matching global parameter in the test, this will cause the empty report. Your test will however still run correctly.
Example:
If in your test you have the Agent, Username, and password parameters
And you are using this Jenkins command line to start the test:
bat label: 'run test', script:"\".\\Ranorex\\Scripts\\${scriptName}\\${scriptName}\\bin\\release\\${scriptName}.exe\" /reportfile:\"${reportFolder}\\${env.Agent}\\${env.JOB_NAME}\\${scriptName}\\${scriptName}.html\" /junit /pa:Database=${env.Database} /pa:Agent=${env.Agent} /pa:Username=${scriptUser} /pa:Password=${scriptPw}
The "Database" parameter is present in the Jenkins bat command, but not in the global parameter. This is what we found to be the cause of the empty reports.
As a solution, you can either remove this part from the command:
/pa:Database=${env.Database}
or add the "Database" parameter to the global parameters of your test.
As far as we found, this will not occur if you start the Ranorex script from within Ranorex studio directly, only if you start it using command line or from a Jenkins pipeline that uses the command line.