i'm new using postman to automate some API. I setup newman to run my collections in gitlab pipeline. I wanted to allow the user to set a value for a Gitlab variables before running my newman test pipeline. i added to my gitlab-ci this command line:
script:
- newman --version
- newman run PalmyraStudio.postman_collection.json -e env.json -g variables.json --env-var "apversion=$APP_VERSION" --insecure
then i added to the environment variables this section to define the var appversion:
{
"key": "appversion",
"value": "$APP_VERSION",
"enabled": true
}
on the request body i called the variable "appversion" then i runned the pipeline with setting the variable value so it failed because the variable appversion is unknown