There are many different ways to define environment variables, depending on your environment.
This guide describes how to define the
CUCUMBER_PUBLISH_TOKEN environment variable with
For security reasons you should not define environment variables containing secrets globally.
For MacOS and Linux users this means you should not define them in
/etc.profile or similar.
For Windows users this means you should not define them via System/Control Panel or
If you are using a terminal to run Cucumber, you should define environment variables in the same terminal.
This also applies to terminals embedded in an editor such as Visual Studio Code or IntelliJ IDEA.
$Env:CUCUMBER_PUBLISH_TOKEN = 'some-secret-token'
If you are using an editor or IDE to run Cucumber via a menu or shortcut, you should define environment variables in the editor.
If you are using a terminal embedded in the IDE, see the Terminal section above.
Click the Run/Debug Configuration dropdown in the toolbar:
Click on the Environment Variables field.
Enter the environment variable and its value into the dialog.
Check the documentation for your editor, or help us improving this documentation by editing this page (link at the bottom of the page).
Every Continuous Integration server has a different mechanism for defining environment variables. Please consult the documentation for your CI server about how to do this.