Mattermost load-test-scripts provides a set of scripts written in Go to help profiling Mattermost under heavy load, simulating real-world usage of a server installation at scale.
Setup
Make sure you have the following components installed:
Run command to copy the sample config.sample.json file.
cp config/config.sample.json config/config.json
Configure the config.json file created according to the load to be tested.
Go to config docs to check details on the config settings.
Run the command make build to create a new binary file for the load test scripts.
Run the command make create_users to create new users with the details present in the config file.
Connect the system admin account with an MS Teams account to link the new channels with the MS Teams channels.
Run the command make create_channels to create the new channels and add the new users to them. Running this command also links the Mattermost channels with the MS Teams channels present in the config file.
Run the command make create_dm_and_gm to create the DMs and GMs between the new users.
Login and connect all the new users with their respective MS Teams accounts to enable the relaying of messages from Mattermost to MS Teams on behalf of these users.
Run the command make create_posts to create the random posts in the Mattermost channels, DMs, and GMs.
Run the command make clear_store to clear all the stored data present in the temporary file called temp_store.json to start load testing with new details.