I had a project which I need a load test for deployed bot. There was a blog post, but it doesn't give the detailed description how to configure load test environment for deployed bot so I wrote this tutorial.
Up and running bot! (If not, you can deploy one of the sample bots on github)
This is the original blog post that I followed to setup the environment.
-
Turn off IE Enhanced Security Configuration To install the following programs, you need to change the security setting for IE.
- Download JDK
- Add system variable for "JAVA_HOME"
- Add this to the PATH
You need to restart your VM after edit environment variable.
- Download Apache JMeter.
- Extract zip file.
-
Download Apache Maven
-
Extract zip file
-
Clone BotServiceStressToolkit project on Github
If you want to use git clone, you need to download git(https://git-scm.com/) first.
-
Move to "BotServiceStressToolkit" directory
-
Execute following command.
mvn clean package
-
Copy the JAR file under target folder after step3 completed.
I use 45678 port for this, but this can be any port number you prefer.
- Open Azure portal and go to the VM you create
- Go to network setting page
- Add inbound port rule like below.
-
Update the configuration info for deployed bot. Those are the field you need to update
- Bot URL: http://your-app-service-name.azurewebsites.net/api/messages
- Callback URL: http://your-vm-public-ip:your-port-number
- Callback Server Listen Host: your-vm-private-ip
- Callback Server Listen Port: your-port-number
-
Increase thread 1 to 100(as many as you want) for load test.
You can add assertion and so on. If you want to know more detail on this, please read the blog post below!