1

I'd like to remove secrets from my karate-config.js and place them in a .ENV file (which is in the .gitignore). That way I can run the Karate tests on various environments (local and Azure Devops pipelines) and only have to set the right environment variables.

The only thing is that I can't find a way to read the properties set in the .ENV file. java.lang.System.getenv('MY_KEY') returns null, while java.lang.System.getenv('PATH') does return the expected data.

Currently I've created a karate-base.js and merge in a secrets.js via a karate.merge('secrets.js), but that's sub-optimal because I still need a file with secrets (passwords/keys) which I want to eliminate.

RuSm
  • 27
  • 1
  • 5

0 Answers0