jenkinsjenkins-pipelinesquish

Squish Jenkins plugin returning 0 while tests fail


Failing tests resulted in green balls in our "Open Blue Ocean" pipeline overview. When I read the manual (https://doc.froglogic.com/squish/latest/rg-cmdline.html) this is according to specification, but using the --exitCodeOnFail should result in our desired behavior. In our Jenkinsfile we scripted the following:

squish([extraOptions: """--tags
${tag}

--retry
2

--config
addAppPath
${squishsrcdir}

--config
addAUT
startSimProApp.bat
${squishsrcdir}

--exitCodeOnFail
-666

--config
setResponseTimeout
30""", squishPackageName: 'squish for qt 6.5.2', testSuite: "${squishsrcdir}", unstableBuildOnError: true])

Unfortunately this results in the following error:

com.froglogic.squish.SquishException: unknown option --exitCodeOnFail

The squish plug-in version is: 8.1.1

What are my options to get red balls when a test fails under squish?


Solution

  • The --exitCodeOnFail option is not supported by the Squish plugin. Take a look at https://doc.froglogic.com/squish/latest/ao-hudson.html#ao-jenkins-example-pipeline-jobs

    The squish step sets neither build nor stage result. It returns the execution results as a string instead. Your pipeline may act based on the returned value. You can find an example on the last screenshot in the linked above chapter.