By Raman Pandey
Hello everyone, this time we bring you another JMeter post for those performance testers following this blog. JMeter is a very extensible and customizable tool, however sometimes it may need a few tweaks to make it look and behave the way you want on your specific OS and setup.
For example you can configure the log, enable and configure HiDPI (High Dots per inch) scaling, change the size of fonts, icons, toolbars, among many other things. This time around though, Raman will explain how to enable and configure Undo and Redo in JMeter and why it is not enabled by default:
Here is the solution for reverting back mistakes/changes while creating these massive JMeter scripts:
Undo and Redo are a very basic features of any editor or 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 the extra memory consumption that would take place, therefore Undo and Redo options are kept hidden or disabled by default.
Initially, the JMeter toolbar without the Undo and Redo buttons looks like this:
Follow the below steps to enable these options:
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
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.
Now, perform some actions in JMeter so that both the buttons get colorfully visible and clickable, as illustrated below
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 JMeter or “Context Menu” by right-clicking on any of the Element as illustrated below:
That is it. Thanks Raman for sharing!
Please leave any comments or questions below.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.