AskYous
AskYous

Reputation: 4730

How do I set up a bot for testing and a bot for production?

I've been tasked with making a bot that is supported on both web and MS Teams. I am thankful for the bot emulator, but it's not the same as a web UI or when using MS Teams. So if my bot works in the emulator, it means very little since it sometimes has different results in the web ui or in MS Teams.

If I want to test the web UI, I cannot do this on my localhost environment. Same with MS Teams. The localhost environment is only good for the bot emulator as far as I know.

Someone recommended me to use ngrok. Then I would go to my Web App Bot in Azure and type my ngrok URL. Then MS Teams and the web UI make requests to ngrok, which makes requests to my localhost, and I can debug very easily.

However, the only way I could do that was to go into my production bot and change the URL (see next image). This means all the users using the bot would now be making requests to my ngrok localhost bot, which I don't want to happen.

enter image description here

I was thinking about setting up two chat bots. But then I get confused because if I make a second bot, and I change that bot's url with my localhost bot on ngrok (like in the picture), would that work? This new "testing" bot would have a different app id and password.

Or maybe I should do something else?

Upvotes: 0

Views: 206

Answers (1)

AskYous
AskYous

Reputation: 4730

Found the answer. It is to create a bot channels registration, which lets you edit the settings without editing the production bot.

See here:

https://learn.microsoft.com/en-us/azure/bot-service/bot-service-debug-inspection-middleware?view=azure-bot-service-4.0&tabs=csharp#inspect-the-state-of-a-bot-configured-in-azure

Upvotes: 1

Related Questions