- Run a test in Jmeter.
- After that terminate it abnormally.
- GUI is showing that test has been stooped but the test is being run at the backend
- I tried to close it from the close button but it is giving a warning that the test is being run firstly Stop or shut down it.
- I closed the same by closing the cmd window of Jmeter but the test is getting executed after restarting of Jmeter.
1 Answer
It might indicate that the machine you're running JMeter at is overloaded.
- Don't run load tests using GUI mode, GUI is designed for tests development and debugging only, when it comes to test execution make sure to run your test in command-line non-GUI mode
- Make sure you're following JMeter Best Practices and recommendations from the 9 Easy Solutions for a JMeter Load Test “Out of Memory” Failure guide.
- Make sure JMeter has enough headroom to operate in terms of CPU, RAM, Network and Disk IO. If machine doesn't have enough resources to simulate that many users as you defined your results will not be accurate as JMeter will not be able to send requests fast enough. You can monitor baseline underlying OS health metrics using i.e. PerfMon Plugin
Assuming all above you should be able to terminate your test gracefully using either shutdown.cmd
shell script or forcefully using stoptest.cmd
script. Both scripts are located under "bin" folder of your JMeter installation.
If after applying above hints you still experience problems you will have to consider going for Distributed Testing as it indicates that single machine cannot kick off that many threads (virtual users) as you require.
-
Thanks, DmitriT for the prompt response. Actually, I am using Beanshell preprocessor to get the current date and time. I am using following script in preprocessor ${__time(yyyy-MM-dd hh:mm:ss A)} Reason being system is throwing an uncaught exception.So that the test is not getting closed. Can you please help me to get the current date? Jan 17, 2018 at 7:51
-
1. Don't inline functions and/or variables into scripts. 2. Don't use Beanshell, you should switch to JSR223 PreProcessor and Groovy language. 3.
A
doesn't make sense, if you want AM/PM marker you should use lower-casea
. The relevant Groovy code would be something likenew Date().format('yyyy-MM-dd hh:mm:ss a')
– Dmitri TJan 17, 2018 at 8:33 -
I have added a JSR223 sampler, do need to give this value to a variable or as it is.If as it is then how to use it in my different request.? Jan 17, 2018 at 8:42
-
I used this format as well ${__time(yyyy-MM-dd hh:mm:ss a)} but getting this error: Error: Unparseable date: \"2018-01-17 03:14:36 PM \"","errors":null,"key":null}} Jan 17, 2018 at 9:46