Unboxing Apache JMeter 4.0 Hello QAInsights Readers! Apache released its newer of JMeter named JMeter 4.0 which support Java 9. In this article, we shall see what’s new in Apache JMeter 4.0, how you can download JMeter 4.0 and start using it in your projects.
After extracting the zip file, go to \apache-jmeter-4.0\apache-jmeter-4.0\bin and double click on jmeter.bat. Very first time, it may throw the security warning, click on More Info and hit Run anyway in Windows 10 machine. Below is the snapshot of JMeter IDE and About Apache JMeter dialog.
The major UI change in JMeter 4.0 is the new theme called Darcula. You can read more about Darcula theme in here.
Personally I like this theme, but if you would like to work in light theme, you can change it. But right now, it will throw below message.
Frequently accessed items are now grouped together and separated by a line as shown below. This will improve your productivity negligibly.
Most useful change in the UI is the transaction names in the Test Script Recorder. You can configure the Prefix or you can enter your Transaction Name while recording.
Auto saving feature now helps you to save your test plan before you trigger it. This will save ample time in case of unexpected crash and failures.
Function Helper now has Generate and Copy to clipboard.
Setting up the JMeter Environment
If you want to run a few tasks before you launch JMeter, you can set it up using setenv.bat in bin folder. E.g. below code will ask the user to enter yes or no. Copy below code and create setenv.bat in bin folder and launch JMeter by double clicking on jmeter.bat.
set /p input= enter yes or no
if %input%==yes echo you typed yes
if %input%==no echo you typed no
echo this is how setenv dot bat works in jmeter four dot O
Above code will be executed before it launches the JMeter. You can use setenv.bat in below situations:
To run test data setup tasks
To restart your environment
To smoke test the applications and/or APIs
To backup the JMeter scripts
To play a small game 🙂
New functions in Apache JMeter 4.0
Following functions are introduced in this newer version:
Boundary Extractor helps you to extract the dynamic/static content from the response. It works like Regular Expression Extractor, but in Boundary Extractor, you need to provide the regular expression. This works for HTTP, Mail Reader and samples generated by transaction controller.
New timer is in town, called Precise Throughput Timer to simulate Poisson arrivals.
Now you can read, browse and clear in JMS Point-to-Point sampler. Also new JSON assertion helps you to check the JSON responses. New If controller warns user to check Interpret Condition as Variable Expression for better performance.
Response Assertion allows users to assert the Request Data.
As usual, in this newer version lots of bug fixes, enhancements have been done. Please download JMeter 4.0 and try again, if you face any issues, please let me know in the comments. Also, make sure that you are taking backups before you upgrade your scripts and execution.
Hi there! NaveenKumar N is a passionate and experienced Performance Test Analyst based in Chicago, IL, USA with the skill sets in Manual Testing, Test Automation, Performance Testing, and Web Services.
He loves to learn and experiment new trends and models in Software Testing.
Please stop by at his personal blogs: NaveenKumarN.in, PerfTractor and Giftt