Skip to content

Instantly share code, notes, and snippets.

@richardfriedman
Last active November 24, 2020 02:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save richardfriedman/e706cdca880a8698228422c89b0b254e to your computer and use it in GitHub Desktop.
Save richardfriedman/e706cdca880a8698228422c89b0b254e to your computer and use it in GitHub Desktop.
Agent Plugin
# only one function is required
# Your parameters
# $1 = home dir for user that will run test
# $2 = user, this is user[NUMBER]
function _plugin_install() {
userHome=$1
# Functions you can use to find other services
# $(plugin_getJMeterHome) - Gets path to jmeter version to be used.
jmeterHome=$(plugin_getJMeterHome)
# other calls
# plugin_getJMeterVersion
# plugin_getGatlingHome
# plugin_getGatlingVersion
# plugin_setting "NAME" <- This will get config bundled in load test package.
# ## plugin_setting serverCount <- how many servers used for this test run
# ## plugin_setting testName <- test name set in UI
# Not useful, but an example
sudo echo "Hello World"
# Change /etc/hosts
echo "127.0.0.1 my-load-agent" | sudo tee -a /etc/hosts
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment