IT-SDK-JMeter
Jump to navigation
Jump to search
Ref-Mix
Ref-JMeter
- https://jmeter-plugins.org/install/Install/
- https://jmeter.apache.org/usermanual/functions.html
- https://jmeter.apache.org/usermanual/functions.html#__digest
- https://jmeter.apache.org/usermanual/get-started.html#proxy_server
Elemente
- Transaction controller
- Debug Sampler
- Constant Throughput Timer: Is used as a goal-oriented element which helps to achieve the desired throughput (Total Number of Requests).
- Throughput Controller
Proxy
- https://jmetervn.com/2017/05/08/how-to-run-jmeter-behind-the-proxy/
- https://jmeter-plugins.org/wiki/PluginsManagerNetworkConfiguration/
https.proxy.domain= https.proxy.port= https.proxy.user= https.proxy.password= --------------------------------- jmeter -H localhost -P 8888 -u username -a password --------------------------------- JVM_ARGS="-Dhttps.proxyHost=myproxy.com -Dhttps.proxyPort=8080" jmeter\bin\jmeter.bat
Setting
- JMeter Properties are global to JMeter and are mostly used to define some of the defaults JMeter uses.
- JMeter Variables are local to each thread. The values may be the same for each thread, or they may be different.
- -----------------
- vars.get is used to retrieve thread-local variables within a specific thread group or thread.
- props.get is used to retrieve global properties that are accessible throughout the entire JMeter instance.
import org.apache.jmeter.util.JMeterUtils;
.
JMeterUtils.setProperty("NAME_VALUE", vars.get("UserName"));
JMeterUtils.getProperty("NAME_VALUE");
.
${__property(NAME_VALUE)}
${__P(NAME_VALUE)}
--------------------------------------------------------------
vars.get("NAME_VALUE");
vars.put("NAME_VALUE", "XXX");
.
props.get("myVar");
props.put("myVar", "myValue");
.
${NAME_VALUE}
Functions
import org.apache.jmeter.util.JMeterUtils;
.
JMeterUtils.loadJMeterProperties("path/to/your/jmeter.properties");
JMeterUtils.saveProperties("path/to/your/jmeter.properties");
.
JMeterUtils.getProperty("myProperty");
JMeterUtils.setProperty("myProperty", "myValue");
.