codeforequity-at / botium-core

The Selenium for Chatbots - Bots Testing Bots
https://www.botium.ai
MIT License
230 stars 64 forks source link

Using Environment Variables in Capability values #505

Closed asonee-omnipresence closed 4 years ago

asonee-omnipresence commented 4 years ago

Is your feature request related to a problem? Please describe. I'm looking to use Environment Variables in capability values (JSON structure) under the bot advanced settings. As per Screenshot1 below, I've a DIRECTLINE3_ACTIVITY_TEMPLATE which is required to set some additional data for every conv with the bot. It has 3 keys, accessToken, userId and userName. These 3 values are not constant and I want use Environment Variables here so it is easier to change the Env variables. I've created a Env variable 'ACCESS_TOKEN' but I was not able to use it in the JSON.

Describe the solution you'd like Is it already possible to use this?

Additional context Screenshot 1: image

Screenshot 2: image

Please advise.

codeforequity-at commented 4 years ago

It's not possible to use environment variables as part of a capability. It is possible to hand over capabilities from environment variables by using the BOTIUM_-prefix (BOTIUM_DIRECTLINE3_ACTIVITY_TEMPLATE) - see Botium Wiki. But I don't see how using environment variables as part of a capability could make your life easier here - you would have to manage them anyhow.

asonee-omnipresence commented 4 years ago

Thanks for the quick response. Yes, I was just wondering if env variables can be used. Like you said, I'd still have to manually change it.