How to use JMeter NON-GUI in WooCommerce

We will study How to use JMeter NON-GUI in WooCommerce. JMeter, an open-source performance testing tool, provides a JMeter non-GUI mode that allows you to run performance tests without the graphical user interface.

Why Use JMeter NON-GUI Mode in WooCommerce?

JMeter GUI mode will consume more resources or memory and is not recommended for heavy load testing. The GUI mode of JMeter is designed for test recording, development, and debugging purpose.

In NON-GUI mode, we can run tests using a command prompt so that JMeter consumes less memory in NON-GUI and prevent test failure due to out-of-memory issues, and also make our performance script more accurate.

Running JMeter in NON-GUI mode has several advantages, including better performance, easier automation, and the ability to run tests on remote servers.

Steps of Running JMeter in NON-GUI mode in WooCommerce:

1) Write a Test Script

  • Create the test script in Jmeter. You can learn more to see how to create test cases in JMeter.
  • This is a sample WooCommerce Registration test script, that I have created for the test.

2) Open Terminal for JMeter NON-GUI mode

  • Open the terminal and go to the bin folder of JMeter.
  • After reaching the bin folder, we need to type this command.
  • For Linux use the command: ./jmeter.sh -n -t (location of your JMeter test script) -l (location of the result file)
  • For Windows use the command: jmeter -n -t (location of your JMeter test script) -l (location of the result file), where
    • -n stands for NON-GUI mode
    • -t name of jmx file that contains the test plan
    • -l name of jtl file to log samples results
  • In my case, the location of the Jmeter script is “/home/users/ankit.kumawat/apache-jmeter-5.5/bin/demo12.jmx”.
  • The command for my script “./jmeter.sh -n -t /home/users/ankit.kumawat/apache-jmeter-5.5/bin/demo12.jmx -l /home/users/ankit.kumawat/apache-jmeter-5.5/bin/demo1html/demo12.csv“.
  • Press Enter and wait for the test to execute.

3) Check the CSV file

  • Now go to the specified location of the result file, and check the CSV file ( like, demo12.csv) is created or not.
bin-folder
  • Now open the CSV file and check the logged results.
JMeter-NON-GUI

Conclusion

By using JMeter NON-GUI mode, you can run performance tests in a more efficient and automated manner that is especially useful for large-scale and distributed load-testing scenarios.

Searching for an experienced
Woocommerce Company ?
Read More


Support

For any technical assistance, please raise a ticket or reach us by mail at [email protected].

Kindly visit the WooCommerce Plugins page to see our add-ons.


Source link