mardi 5 mai 2020

TestCafe: export command is not working in Linux

I am using testcafe for my automation.

According to the documentation Set Environment Variables I am using set for windows running locally and export for running the tests on a Linux environment using Jenkins job. In windows, it's working completely fine. But in Linux export command is not setting the environment variables.

The shell command I am using in windows set ENV=staging& npx testcafe \"chrome:headless --no-sandbox --disable-dev-shm-usage\" automation_suite/tests

The shell script command I am using in Jenkins to run on Linux Jenkins pipeline script

  stage('Run tests') {
   steps {
    sh 'npm run ci360:smoketest:chrome:headless'
   }
  }

The shell command

npm run ci360:smoketest:chrome:headless will automatically invoke the command

export ENV=staging& npx testcafe \"chrome:headless --no-sandbox --disable-dev-shm-usage\" automation_suite/tests which is defined in scripts section of package.json

not sure what's the issue here and I was stuck at this point. Any help is appreciated.

Aucun commentaire:

Enregistrer un commentaire