Use environment variables in node script

envman
environment-variable
#1

Hi, I want to test the app that is uploaded to Browserstack.
In Browserstack upload step I have:
[upload app and return app_url] | envman add --key BROWSERSTACK_APP_ANDROID

And in webdriverio config I have this refecence:
app : process.env.BROWSERSTACK_APP_ANDROID

As a result, app property is not read during test at all (not app: null, just no app).

Please explain, how to write environment variables in node scripts correctly?

Thanks!

0 Likes