How can I make load testing of Telegram (of FB Messenger) Chatbot? Is there any online/offline tools like load testing in Microsoft Bot Framework?
I know about tools such as Tsung, but how can I use it when chatbot deployed on Heroku?
Tsung is hard, I recommend to use Jmeter since you just need to test your single HTTP API endpoint.
Your bot has a webhook entry point - this is a single HTTP API request. So you just need to push some load into it.
You can try to emulate different HTTP requests with different body data (Telegram messages, statuses, other data.) and then start with 1, 5, 10 requests per second. Jmeter provides all this stuff. And then monitor your Heroku app for errors in logs etc.
Related
I am trying to integrate my Botpress (Chatbot) with Kendra. So that when a user types a query it will trigger the Kendra and give the results. I have created the s3, Index & Experience. I am getting the response on Kendra experience. But I want to connect my Kendra with a chatbot whose backend is Node.js. In my bot I have to make connections and in the Kendra documentation there is nothing I found to make a connection to my Kendra.
Amazon LEX has a native offering for integrating with Kendra - https://aws.amazon.com/blogs/machine-learning/integrate-amazon-kendra-and-amazon-lex-using-a-search-intent/.
For other chatbots, you need to build the integration using AWS SDKs.
I have a BOT running which reponds to api/messages URL from the BOT Framework Emulator, and I can send text to it.
However what I need to do is write an application which sends text to the BOT over this URL. That is basically does what the BOT Framework Emulator does when I enter text and send it, probably over the graph API.
I am aware of information which demonstrates sending to a chat in a channel, but I just need to send to the BOT itself.
Can anyone advise how I can do this, or is there a suitable sample which demonstrates it.
Thanks
At the end of the day, your bot is really just a web api endpoint. If you set up a tunneling service like ngrok, you can use it's built-in web viewer to see the traffic that is sent to you bot, e.g. via the emulator or even via the azure bot registration page (there is a similar emulator built into the page in Azure). Once you've seen that traffic, you can essentially just mirror it from whatever you want to call from - it's essentially a json payload.
However, considering your bot is just a web api, I'm not sure why you want to "call" your bot from another app. Why not just make another endpoint that you can use for app-to-app communication (like a normal api endpoint). You can then refactor your code so that whatever you need to do can be done either via a bot message OR via the API call.
I have a web app in production using Twilio which makes use of the programmable video API and various webhook call backs. When certain events happen, Twilio lets my API know via the webhook so the appropriate actions are then triggered.
From what I can tell, there is no development (ie: sandbox) environment for Twilio. This is very strange. I would expect there to be a sandbox environment so that we can do complete local development without needing to create fake responses from Twilio for webhooks and the likes.
It appears that Twilio's recommendation is to use ngrok or similar for development. But this is not possible when you already have a production application running and Twilio has no sandbox. I can't simply change my webhook endpoint in my Twilio account to point to my local ngrok end point. That would mean that my production end point is not live during that time.
The other suggestion by Twilio is that we create fake responses which we expect to receive by using curl or similar. This seems incredibly impractical having to trigger fake responses at dozens of different points in time throughout the flow of an app rather than simply receiving them from a sandbox/dev environment with Twilio.
What is the recommended method to do local Twilio related development which incorporates webhook callbacks when you already have a production app running?
I'm not familiar with Twillio specifically but generally speaking, you can add multiple webhook URLs. The idea would be to have one URL pointing to your production server and another pointing to the Ngrok endpoint.
Alternatively, you could use https://hookdeck.io (disclaimer: I'm the founder) to send the same webhook to multiple URLs. We call this webhook fan-out, you could set up both your production URL and Ngrok as destinations and provide a single endpoint (provided by Hookdeck) to Twilio.
It would look something like this:
let's say I've created slack app and I have client id and secret.
What is the easiest way to get SLACK_APP_TOKEN in my hands that will be able to create channel?
If you want a proper access token that is related to your Slack App the only way to get it is to install your Slack app with the OAuth process as described here in the Slack documentation. You will need a mini website with a script (e.g. PHP) to perform the installation.
The so called test token will also allow you use the Slack API (e.g. to create a channel), provided that the user that created the test token has that right on your Slack. It is the easiest to obtain, but it will always be linked to a user account, not a Slack app. And you can not request specific scopes for it. So for most applications its better to use a Slack App and get a proper access token by installing it.
If you are looking for an example for an installer script, here is a complete script in PHP. It will run on any webserver that supports PHP. Its very basic, but it will work just fine.
I am creating an app in ASP.NET-MVC where I can call phone number from browser.
To do that I need to create capability token like in the sample:
var capability = new TwilioCapability(accountSid, authToken);
capability.AllowClientOutgoing(appSid);
capability.AllowClientIncoming("jenny");
string token = capability.GenerateToken();
The appSid is an identifier of TwimlApp created on my Twilio account as described here: https://www.twilio.com/help/faq/twilio-client/how-do-i-create-a-twiml-app
I have absolutely no idea what should I put in the Request URL in Voice section. I develop on locally on my computer. ASP.NET-MVC app is run on localhost.
Sample image from Twilio's website:
Developing with a web service like Twilio can be difficult when it needs to make requests from a server to your development environment. One of the best tools I've found to make this easy is called ngrok.
ngrok allows you to create tunnels to your machine and give them a friendly name with a custom port.
For example, you could setup ngrok locally on your machine to forward all requests from twilio to yoda.ngrok.com to your environment. This makes it really easy to develop locally with web hooks. Let me know if you have any questions on getting setup!