Understanding JMeter

Understanding JMeter

Understanding JMeter
Understanding JMeter

In this section, we will be understanding JMeter. Therefore, let’s begin.

The Apache JMeter™ application is open-source software. It is a 100% pure Java application which test functional behavior and measure performance. Moreover, it evaluates performance on static as well as dynamic resources.

Further, JMeter can help you regression test your application by letting you create test scripts with assertions to validate that your application is returning the results you expect.

Apache JMeter features include:

  • Firstly, Ability to load and performance test many different applications/server/protocol types:
  • Secondly, Web – HTTP, HTTPS (Java, NodeJS, PHP, ASP.NET, …)
  • In addition, SOAP / REST Webservices
  • Moreover, Database via JDBC
  • Further, LDAP
  • Lastly, Message-oriented middleware (MOM) via JMS

Understanding JMeter Running

To run JMeter, run the jmeter.bat (for Windows) or JMeter (for Unix) file. You can find these files in the bin dictionary.

It may be necessary to set a few environment variables to configure the JVM used by JMeter. JVM_ARGS=”-Xms1024m -Xmx1024m” jmeter -t test.jmx [etc.]

will override the HEAP settings in the script.

To set those variables permanently, you can place them in a file called setenv.sh in the bin directory. An example for bin/setenv.sh could look like:

Firstly, # This is the file bin/setenv.sh,

Secondly, # it will have its source in bin/jmeter

After that, # Use a bigger heap, but a smaller metaspace, than the default

export HEAP=”-Xms1G -Xmx1G -XMaxMetaspaceSize=192m”

# Try to guess the locale from the OS. Space as value is on purpose!

export JMETER_LANGUAGE=”

  • GC_ALGO – Java runtime options to specify JVM garbage collection algorithm. Defaults to -XX:+UseG1GC -XX:MaxGCPauseMillis=250 -XX:G1ReservePercent=20
  • HEAP – Java runtime options for memory management used when JMeter is started. Defaults to -Xms1g -Xmx1g -X:MaxMetaspaceSize=256m
  • JAVA_HOME – Must point at your Java Development Kit installation. Required to run the with the “debug” argument. On some OSes it JMeter will try its best to guess the location of the JVM.
  • JMETER_COMPLETE_ARGS – If set indicates, that JVM_ARGS and JMETER_OPTS are to be used, only. All other options like HEAP and GC_ALGO will be ignored. Default is empty.
  • JMETER_HOME – May point to your JMeter install dir. If empty it will be set relative to the jmeter script.
  • JMETER_LANGUAGE – Java runtime options to specify used language. Defaults to -Duser.language=en -Duser.region=EN
  • JMETER_OPTS – Java runtime options used when JMeter is started. Special options for operating systems might be added by JMeter.

Create Test Plan from Template

Firstly, you have the ability to create a new Test Plan from the existing template. To do so you use the menu File → Templates… or Templates icon:

After that, a popup appears you can then choose a template among the list:

Lastly, documentation for each template explains what to do once the test plan is created from the template.

 

Get certified and unlock more opportunities. Practice and Validate your skills to become a Certified Agile Testing Professional Now!

Selenium-WebDriver API by Example
Rally

Get industry recognized certification – Contact us

keyboard_arrow_up
Open chat
Need help?
Hello 👋
Can we help you?