JMeter Undo & Redo options

Undo and Redo are the very basic feature of any Editor or any IDE. It is really annoying that such a basic feature is not found in JMeter. Here is the catch. JMeter has this feature but not by default and therefore we have to enable it from our end. JMeter team believes in making JMeter as light as possible and they are avoiding extra memory consumption that JMeter can take and hence Undo and Redo options are kept hidden or disabled by default.

Initially, the JMeter toolbar without Undo and Redo buttons looks like this:

JMeter version 5.1.1
Figure 01: JMeter without Undo and Redo options

Follow the below steps to enable these options:

  1. Navigate to the “bin” folder of the JMeter directory
  2. Open the “jmeter.properties” file using Notepad or Notepad++
  3. Search for “undo.history.size”
  4. Uncomment the line “undo.history.size=0” by removing # (sharp sign)
  5. Set a natural number as a value of the “undo.history.size” attribute e.g. 1, 5, 10, 50 etc. (This number represents the maximum number of steps that you can undo or redo.)
  6. Save the file “jmeter.properties” and relaunch JMeter to reflect the changes.
How to enable Undo and Redo Option in JMeter
Figure 02: jmeter.properties file

Remember: The number must be a natural number (1,2,3,….n) or simply say positive integer other than 0. The suggested value by JMeter is 25 which you can see in the description above this line in “jmeter.properties” file, it shows “Set it to a number > 0 (25 can be a good default)”. So, you can give 1 or 5 or 7 or 10 or 12 or 15 or 25, but not Zero. If you give Zero, there will not be any changes.

Precaution:

This number represents the maximum number of steps that you can undo or redo. You can set this to a larger number e.g. 50 or 100 but the bigger it is, the more it consumes memory. When you try to undo/redo more than 5-10 steps at a time then you will notice a big slowdown in JMeter. Hence, the JMeter team suggest having a maximum value of 25 and that too for a computer with very high RAM memory. For most of the normal users, 5 or 7 solve their purpose. Here, I have given the value of 5 which is shown above.

Once you restart the JMeter you can see Undo and Redo options in the JMeter toolbar which are greyed out; indicate no action done yet.

JMeter with Undo and Redo Options
Figure 03: JMeter with Undo and Redo options

Now, perform some actions in JMeter so that both the buttons get colourfully visible and clickable, as illustrated below:

Enabled Undo and Redo buttons
Figure 04: Enabled Undo and Redo buttons

Limitation: Ctrl + Z or Command + Z (in Mac OS) does not work in JMeter. Only clicking the Undo/Redo button in the toolbar works.

You can also do Undo/Redo from the “Edit” option of the JMeter (Figure 05) or “Context Menu” by right-clicking on any of the Elements (Figure 06), as illustrated below:

Undo and Redo options in Toolbar
Figure 05: Undo and Redo options in Toolbar
Figure 06: Undo and Redo options in the Context bar

You may be interested:


4 thoughts on “JMeter Undo & Redo options”

Leave a Comment