Though cloud-based load testing services such as RedLine13 allow you to easily scale your load test, the majority of JMeter test plans begin on the local machine. The JMeter GUI is used to assemble the major components. First tests begin inside the GUI, usually monitored with a listener. When transitioning your test to the cloud however, the user interface is stood down to remove the overhead and achieve scale.
Local Tests from the Console
As an intermediate step in preparing your JMeter test for the cloud, you could run it from the console without loading the GUI. This would allow you to focus on performance as well as simulate a distributed test run as closely as possible.
Starting a JMeter in non-GUI mode is easily done from the command line. This is accomplished by running JMeter with the “--nongui
” command line option along with specifying your JMX file with “--testfile
”:
> jmeter –nongui –testfile test_plan.jmx
You can also use the “-n
” and “-t
” shorthand equivalents of these command line options:
> jmeter -n -t testplan_jmx
One caveat to running your test in this manner is that no visible feedback is given until your test completes or is manually terminated. However, we can change this by adding the Console Status Logger plugin.
The Console Status Logger
In order to provide meaningful real-time output when running a JMeter test in non-GUI mode from the command line, you can add the Console Status Logger plugin to your test. This will periodically print out real-time data about your test including latency, running threads, errors, and more. Here is an excerpt of the basic output generated by this component:
Once you are satisfied with the local performance of your test, you can remove the Console Status Logger and move your test to a cloud-based provider in order to achieve maximum scale.
Did you know that RedLine13 offers a full featured, time limited free trial? Sign up now, and start testing today!