How to pass argument or value while running newman from gitlab pipeline

1.2k Views Asked by At

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

0

There are 0 best solutions below