Tags

,

Edit the user.properties file found under the {JMETER_PATH}/bin folder and add these lines:

CookieManager.delete_null_cookies=false
CookieManager.save.cookies=true
## Uncomment this line if you want to include the url in the summary but take note loading the .jtl file in JMeter will return an error.
# jmeter.save.saveservice.url=true 
# jmeter.save.saveservice.requestHeaders=true

The CookieManager.save.cookies=true property works along with the “HTTP Cookie Manager” Config Element to save cookies as variables, which can be referenced like this: ${COOKIE_cookiename}
HTTP Cookie Manager

Next edit the bin/JMeter.properties file and enable the summariser options:

# Define the following property to automatically start a summariser
# with that name(applies to non-GUI mode ony)
summariser.name=summary
#
# interval between summaries (in seconds) default 3 minutes
summariser.interval=180
#
# Write messages to log file
summariser.log=true
#
# Write messages to System.out
summariser.out=true

After enabling the summariser options, you would get the summary every 180 seconds or 3mins to both Stdout and log file.
summary + 41 in 15.4s = 2.7/s Avg: 2234 Min: 383 Max: 6974 Err: 0 (0.00%)
summary + 57 in 21.5s = 2.6/s Avg: 2548 Min: 618 Max: 4528 Err: 0 (0.00%)
summary = 98 in 32.5s = 3.0/s Avg: 2416 Min: 383 Max: 6974 Err: 0 (0.00%)
summary + 108 in 21.8s = 5.0/s Avg: 1291 Min: 229 Max: 6317 Err: 0 (0.00%)
summary = 206 in 52.5s = 3.9/s Avg: 1827 Min: 229 Max: 6974 Err: 0 (0.00%)

To run the JMeter test plans:

$ cd /jmeter/bin/
$ ./jmeter -t <path/filename.jmx> -n -l <path/filename.jtl>

Once the testing is done, you can load the file in JMeter app and see the Summary report.
Here are the available options:
-n This specifies JMeter is to run in non-gui mode
-t [name of JMX file that contains the Test Plan].
-l [name of JTL file to log sample results to].
-j [name of JMeter run log file].
-r Run the test in the servers specified by the JMeter property “remote_hosts”
-R [list of remote servers] Run the test in the specified remote servers

References:
https://lincolnloop.com/blog/load-testing-jmeter-part-1-getting-started/

Advertisements