How to do Load Testing with rasa chatbot?

I want to do load test with my chatbot so is there anyway to send request. I have integrated my chatbot with rasa and telegram but i want a way to send request for my load testing

Hi @rishier827!

You can use the api to send request for load testing. I wrote a quick and dirty python script to test intent confidence, but you can use the same principle for sending multiple requests to rasa. Here’s a snippet:

import requests, time  

NLU_URL = "http://localhost:5005/webhooks/rest/webhook"

with open('sentences.txt') as f:
    for x in f:
        test_phrase = x.replace('\n', '')

        payload = '{ "sender": "tester", "message" : "' + test_phrase + '"}'

        tic = time.time()
        r =, data=payload.encode('utf-8'))
        tac = time.time()

        elapsed_time = tac - tic

        print('Elapsed time %.2f seconds' % elapsed_time)

Change the URL if you are using a different port.

1 Like

chatbot test automation software botium can do load and stress testing for rasa

well ill try thankz