Accessing the variables from "robot publish" in a Jenkins declarative groovy script?

Viewed 116

I'd like to print some of the variables coming from robot's publish function, such as ROBOT_PASSRATIO, in the output of a Jenkins declarative script. This is of course written in Groovy.

However, when attempting to interpolate ${ROBOT_PASSRATIO} it comes out as null.

That values and others are also not in the environment variables, either. In non-declarative scripts, they've always been accessible just by calling them with ${}. So where are my variables? Do I need to do something specific to get robot to set them in env?

1 Answers

Check that Editable Email Notification is enabled in your project configuration.

Also make sure to interpolate ROBOT_PASSRATIO in a separate stage after Robot collects test results.

Related