Difference between revisions of "IT-SDK-JMeter"
Jump to navigation
Jump to search
Samerhijazi (talk | contribs) (→Ref.) |
Samerhijazi (talk | contribs) (→Functions) |
||
| Line 41: | Line 41: | ||
=Functions= | =Functions= | ||
<pre class="code"> | <pre class="code"> | ||
| + | import org.apache.jmeter.util.JMeterUtils; | ||
| − | + | JMeterUtils.loadJMeterProperties("path/to/your/jmeter.properties"); | |
| + | JMeterUtils.saveProperties("path/to/your/jmeter.properties"); | ||
| + | |||
| + | JMeterUtils.setProperty("myProperty", "myValue"); | ||
</pre> | </pre> | ||
Revision as of 09:36, 9 April 2024
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.proxy.domain= https.proxy.port= https.proxy.user= https.proxy.password= --------------------------------- jmeter -H localhost -P 8888 -u username -a password
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.
import org.apache.jmeter.util.JMeterUtils;
JMeterUtils.setProperty("NAME_VALUE", vars.get("UserName"));
JMeterUtils.getProperty("NAME_VALUE");
${__property(NAME_VALUE)}
${__P(NAME_VALUE,)}
--------------------------------------------------------------
vars.put("NAME_VALUE", "XXX");
vars.get("NAME_VALUE");
${NAME_VALUE}
Functions
import org.apache.jmeter.util.JMeterUtils;
JMeterUtils.loadJMeterProperties("path/to/your/jmeter.properties");
JMeterUtils.saveProperties("path/to/your/jmeter.properties");
JMeterUtils.setProperty("myProperty", "myValue");