JMeter is an open-source performance testing tool, written in pure Java, small size, powerful, basic can meet the performance testing requirements. Another jmeter also right a series of plug-ins to enhance its functionality, plug-in address jmeter-plugins.org. Plug-ins now have 5, respectively, standard Set,extras Set,extras with Libs Set,webdriver set, Hadoop set.
Standard set (normal plug-in set)
Basic plug-ins to meet your daily needs. No third-party jar packages are required, address http://jmeter-plugins.org/wiki/StandardSet/.
The plugin expands the functions of jmeter in the aspects of result collection, thread group, listening interface, and some useful functions (personal feeling this is really useful), the following is the introduction of functions.
- Chooserandom
This method allows you to randomly select one of the specified data. Parameters:
- first parameter: First
- second parameter in data set: Second
- ... Other options in data set ...
- last argument: Place the selected result into the variable
example, randomly select one in the specified color and store in the Randomcolor variable: ${__chooserandom (Red,green,blue,orange,violet, Magenta,randomcolor)}
- doublesum This method is used to sum the data. Parameter:
- first number of sums-required
- second number of summation-required
- Additional data for summation – optional
- last parameter – Saves the result in the variable example, calculates the sum of 3.5 and 4.7, and saves the result in Sumvariable: ${__doublesum (3.5, 4.7, Sumvari ABLE)}
- isdefined The method determines whether a variable has been defined, and if the definition returns 1, no definition returns 0. Parameters:
1. First parameter: variable, function name, or constant
Example to determine if TestVar is already defined
${__isdefined (TestVar)}
- Uppercase and lowercase conversion case
- substring gets a subset of the specified string
Extras Set (expand plugin Set)
Additional extensions, including some complex performance testing requirements, do not require a third-party jar package.
Extras with Libs set (requires Libs extension set)
Plug-in collections that require third-party jar packages
Webdriver Set
This plugin set, integrated SELENIUM/WEBDRIVDR (Selenium is a framework tool for Web automation). This plugin allows JMeter to drive the browser (Firefox, Chrome) or Android system via JS code, to test the stability of the page, two-minute quick tutorial.
After adding Firefox (or Chrome) Driver config and web Driver sampler to the thread group, add the following code to the Web Driver sampler:
WDS.sampleResult.sampleStart() WDS.browser.get(‘http://google.com‘) if(WDS.browser.getTitle() != ‘Google‘) { WDS.sampleResult.setSuccessful(false) WDS.sampleResult.setResponseMessage(‘Page title is not Google!‘) } WDS.sampleResult.sampleEnd()
Run the thread group, you can use the browser to open Google, more detailed syntax, click here.
Hadoop Set
Hadoop/hbase Test Plug-in
JMeter expansion Plug-in (Jmeter-plugins)