Skip to content

redline13/plugin-developer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Writing Custom Dev Plugins for Agent Set Up

Write custom plugin.

  • It's a bash script
  • Implement "function _plugin_install()"
  • Here is an example
  • Source Example : Agent Plugin (Gist)
# You 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
  echo "Hello World"
  
  # Change /ets/hosts, you can use sudo - its your load agent
  echo "127.0.0.1 my-load-agent" | sudo tee -a /etc/hosts
}

Enable custom plugins

Using Plugin For Test

Now run your test as usual.

About

Custom Dev Plugins

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published