JMeter Undo & Redo options

How to enable JMeter Undo and Redo Options

Undo and Redo are the very basic feature of any Editor or any IDE. It is really annoying that if 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 button looks like:

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

Follow the below steps to enable these options:

  1. Navigate to “bin” folder of JMeter directory
  2. Open “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 “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, JMeter team suggest to have 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 as 5 which 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 “Edit” option of the JMeter (Figure 05) or “Context Menu” by right-clicking on any of the Element (Figure 06), as illustrated below:

Undo and Redo options in Toolbar
Figure 05: Undo and Redo options in Toolbar
Undo and Redo options in Contextbar
Figure 06: Undo and Redo options in Contextbar

You may be interested:


4 Responses

  1. Pravesh Shrivastava says:

    Knowledgeable article

  2. Aniket says:

    Great article
    Thanks for sharing !

Leave a Reply

Your email address will not be published. Required fields are marked *