We recently created a dedicated bamboo plan for using tsung to run load testing. (It can be added as a ‘test’ stage into the exisiting bamboo plan too). Instead of installing tsung in bamboo agent, we use a dedicate box as it is resources extensive.
Here is how we set it up:
1) Create a bamboo build plan and link it to a repo where all the tsung configuration files are saved. Every build is to check out the latest tsung configuration files.
2) Create a deployment plan for the build plan. The deployment plan includes many environments. Each environment is for a different configuration file. The name of the configuration file is set as a variable named ‘tsung_config’ in bamboo.
3) The task workflow: download the artifacts (tsung configurations) -> start the tsung EC2 instance if it is not running -> create a folder for each releaes on the tsung box -> SCP the configuration file to the tsung box -> Run load testing then parse the result and compare it with the threshold to determine the testing is pass or failed.
Task details:
All logs can be retrieved:
Parse the test result then compare with the threshold to determined the test is pass or failed.
The relevant codes can be found here.
One thought on “Bamboo plan for tsung”