JMeter GUI: test plan and workbench

Time:2022-5-29

Wechat official account – it passer-by, focusing on sharing it related knowledge, paying attention to me, and promoting and raising salary together!

  1. test plan
  2. Workbench

    JMeter GUI: test plan and workbench

    73.png
  • What is a test plan?

  • What is a workbench?

  • How do I add elements?

  • Loading and saving elements

  • How to create a JMX file

  • How to run JMX files

  • How to configure elements

  • How to save a test plan

  • Create composite test plan

  • How to run a test plan

What is a test plan?

The “test plan” is where the elements required for JMeter testing are added. It stores all the elements (such as ThreadGroup, timers, etc.) required to run the required tests and their corresponding settings. The following figure shows an example of a test plan

JMeter GUI: test plan and workbench

75.png

What is a workbench?

The workbench simply provides a location to temporarily store test elements. It saves only the contents of the test plan branch

JMeter GUI: test plan and workbench

77.png

“Workbench” will be used in our tutorial HTTP proxy server recording test. For now, ignore it.

How do I add elements?

Adding elements is a key step in building a test plan, because JMeter will not be able to execute the test plan without adding elements. The test plan includes many elements, such as listeners, controllers, and timers. You can add elements to the test plan by right clicking the test plan and selecting new elements from the “add” list.

Suppose you want to add two elements to the test plan BeanShell assertion and Java default

  • Right click test plan – > Add – > assert – > bean shell assert

  • Right click test plan – > Add – > config element – > java request default

    JMeter GUI: test plan and workbench

    79.gif

You can also delete unused elements. Suppose you want to delete the element “HTTP request defaults”, select “HTTP request default” – > right click – > select remove from the context menu – > click Yes to confirm to delete this element in the message box

JMeter GUI: test plan and workbench

81.png

How to create a JMX file

Suppose you have added an element named “BeanShell assertion”. Now I want to save it. Right click BeanShell assertion – > select Save selection as

JMeter GUI: test plan and workbench

83.png

A dialog box will be displayed. Click the Save button to save the element in the default name BeanShell assertion JMX. If necessary, you can choose another name

JMeter GUI: test plan and workbench

85.gif

JMeter test elements and test plans are displayed in * JMX format storage. JMX stands for Java management extension.

How to run JMX files

Loading existing elements can help save time in creating and configuring new elements. Suppose there is an existing element in the test plan: Java request default. Right click Java request defaults – > select merge

JMeter GUI: test plan and workbench

87.png

Select the element (BeanShell assertion.jmx. this element will be added to the current test plan.

JMeter GUI: test plan and workbench

89.png

How to configure elements

To configure any element

  1. Select an element in the tree on the left pane

  2. Enter configuration settings in the right pane

    JMeter GUI: test plan and workbench

    91.gif

How to save a test plan

You should save the test plan before running the test. To save a test plan save a test plan-

  1. File – > save test plan as – > display a dialog box

  2. Enter the file name of the test plan – > Click Save

    JMeter GUI: test plan and workbench

    93.png

    Note: saving a test plan is different from saving elements.

Save test plan Save element
A test plan consists of one or more elements Element is the basic component of JMeter
When you save a test plan, all elements in the plan are saved When you save an element, only one element is saved.

Create composite test plan

You can merge one or more test plans to create a composite test plan, as shown in the following figure

JMeter GUI: test plan and workbench

95.gif

Assume that there is already a test plan named test on the computer_ Fragment JMX (this article contains this file). You can merge this test plan into the current test plan on JMeter to create a new test plan.

JMeter GUI: test plan and workbench

97.png

Now, file test_ Fragment All test elements in JMX have been added to the current test plan, as shown in the following figure

JMeter GUI: test plan and workbench

99.png

How to run a test plan

To run a single or multiple test plans, select control+r from the Run menu item.

JMeter GUI: test plan and workbench

101.png

When JMeter is running, it displays a small green box at the right end of the menu bar.

JMeter GUI: test plan and workbench

103.png

The number to the left of the green box is the number of active threads / total threads. To stop the test, press the stop button or use the shortcut ctrl+ ‘

JMeter GUI: test plan and workbench

105.png

Test report

When the test execution is completed, the test report can be obtained. The test report includes an error log file. Here is a sample log file for JMeter

  • 2013/08/18 08:41:12 INFO – jmeter.JMeter: Copyright (c) 1998-2013 The Apache Software Foundation
  • 2013/08/18 08:41:12 INFO – jmeter.JMeter: Version 2.9 r1437961
  • 2013/08/18 08:41:12 INFO – jmeter.JMeter: java.version=1.7.0_25
  • 2013/08/18 08:41:12 INFO – jmeter.JMeter: java.vm.name=Java HotSpot(TM) Client VM
  • 2013/08/18 08:41:12 INFO – jmeter.JMeter: os.name=Windows 7
  • 2013/08/18 08:41:12 INFO – jmeter.JMeter: os.arch=x86
  • 2013/08/18 08:41:12 INFO – jmeter.JMeter: os.version=6.1
  • 2013/08/18 08:41:12 INFO – jmeter.JMeter: file.encoding=Cp1252
  • 2013/08/18 08:41:12 INFO – jmeter.JMeter: Default Locale=English (United States)
  • 2013/08/18 08:41:12 INFO – jmeter.JMeter: JMeter Locale=English (United States)
  • 2013/08/18 08:41:12 INFO – jmeter.JMeter: JMeterHome=C:\Nguyen\Source_code\apache-jmeter-2.9
  • 2013/08/18 08:41:12 INFO – jmeter.JMeter: user.dir =c:\Nguyen\Source_code\apache-jmeter-2.9\bin
  • 2013/08/18 08:41:12 INFO – jmeter.JMeter: PWD =C:\Nguyen\Source_code\apache-jmeter-2.9\bin

Browse the Web:https://www.itxiaonv.com/, learn more about it

JMeter GUI: test plan and workbench

26322751-8bd00fde1a719aa1.jpg