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 a known issue and reported to Ranorex team by Michiel Vanthuyne:
"Ranorex will produce empty report files if an argument is passed in the command that has no matching parameter in the Global Parameters of the test suite.
For Jenkins jobs that use the general "RunAllRanorexTests.groovy" pipeline code, these parameters are required: "Database", "Agent", "Username", "Password", "DevcoreLaunchCube"
If you have jobs that use custom pipeline jenkinsfiles, and are facing empty report files, make sure you check that the command line arguments in your pipeline match with the global parameters in your testsuite.
I have reported this issue to Ranorex, I expect that with a fix the missing parameters would be logged in the report instead of causing an empty report."
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.