I was asked by somebody in the office to extend JMeter so that when running tests, and threads stop (due to failure) to make a way to restart the thread. What I have done is to create a new Visualizer that lists all the running threads, and allows you to right click on them in the list and stop/restart them. However, this required a few changes to the way JMeter works. 1. When the initial parsing of the test tree occurs, a new traverser was added that passed an instance of the engine being used to all test plan tree objects that are derived from AbstractVisualizer. 2. AbstractVisualizer was extended to receive the engine instance. 3. StandardJMeterEngine was extended to be able to restart threads, and accept JMeterEngineMonitors. 4. JMeterThread was extended to fire events to JMeterThreadMonitor (which was also extended) to indicate when it started. 5. A new class JMeterEngineMonitor was created to monitor when engines create threads, when their threads are stopped, and when the test starts/stops. 6. New visualizer class ThreadWatcherVisualizer, and ThreadWatcherTableDataModel were created for the GUI. 7. messeages.properties was modified to add the extra strings for the visualizer. The visualizer is used by addeding it to the test plan, then when a test is running, you can see/change the running status of all the threads. When all threads are stopped - the test stops. I have attached a patch file to this email. - Nnamdi
Created attachment 16210 [details] Patch file
*** Bug 37811 has been marked as a duplicate of this bug. ***
Yannick said me privately that changing the Product entry was not what he wanted to do.
Hi Guys, This seems to be a great feature! and has been on the shelf for a while. Any news on when then patch can be applies? Cheers, Ravi
As far as I can tell, the suggested feature only works for GUI mode. Also, a thread only stops due to failure if the test plan is configured to do so; normally a thread will continue running until the test ends. JMeter Thread Groups now support "Start Next Loop" on error.
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/1586