Bug 48749

Summary: Allowing custom Thread Groups
Product: JMeter - Now in Github Reporter: Andrey Pohilko <apc>
Component: MainAssignee: JMeter issues mailing list <issues>
Status: RESOLVED FIXED    
Severity: enhancement    
Priority: P2    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Bug Depends on:    
Bug Blocks: 48883    
Attachments: Changes to source files
new abstract ThreadGroup
new abstract ThreadGroupGui
Proposed source code changes
Proposed source code changes

Description Andrey Pohilko 2010-02-16 09:45:07 UTC
One unable to write custom plugin for Thread Groups to have advanced thread start/stop scheduling. Attached patch adds such ability to JMeter.

Responsibility for threads scheduling moved from StandardJMeterEngine to implementations of AbstractThreadGroup.
Comment 1 Andrey Pohilko 2010-02-16 09:45:58 UTC
Created attachment 24996 [details]
Changes to source files
Comment 2 Andrey Pohilko 2010-02-16 09:46:36 UTC
Created attachment 24997 [details]
new abstract ThreadGroup
Comment 3 Andrey Pohilko 2010-02-16 09:46:58 UTC
Created attachment 24998 [details]
new abstract ThreadGroupGui
Comment 4 Andrey Pohilko 2010-02-16 10:06:19 UTC
There's issue with icons after this patch, JMeter seems to fail finding icon for thread groups... I failed to find a fix for this issue.
Comment 5 Andrey Pohilko 2010-02-16 10:22:19 UTC
Maybe it could be better also move total threads number GUI from ThreadGroupGui to AbstractThreadGroupGui because it's common property as "on error" buttons
Comment 6 Andrey Pohilko 2010-02-16 10:26:22 UTC
Created attachment 24999 [details]
Proposed source code changes
Comment 7 Andrey Pohilko 2010-02-16 10:37:59 UTC
Created attachment 25000 [details]
Proposed source code changes

Issue with icons solved
Comment 8 Sebb 2010-02-23 23:29:09 UTC
Thanks very much!

The code has been applied:

URL: http://svn.apache.org/viewvc?rev=915587&view=rev
Log:
Bug 48749 - Allowing custom Thread Groups

Added:
   jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/AbstractThreadGroup.java   (with props)
   jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/gui/AbstractThreadGroupGui.java   (with props)
Modified:
   jakarta/jmeter/trunk/src/components/org/apache/jmeter/control/gui/ModuleControllerGui.java
   jakarta/jmeter/trunk/src/components/org/apache/jmeter/timers/ConstantThroughputTimer.java
   jakarta/jmeter/trunk/src/core/org/apache/jmeter/control/gui/TestPlanGui.java
   jakarta/jmeter/trunk/src/core/org/apache/jmeter/engine/ConvertListeners.java
   jakarta/jmeter/trunk/src/core/org/apache/jmeter/engine/StandardJMeterEngine.java
   jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/util/MenuFactory.java
   jakarta/jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties
   jakarta/jmeter/trunk/src/core/org/apache/jmeter/testelement/TestPlan.java
   jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterContext.java
   jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterThread.java
   jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/ThreadGroup.java
   jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/gui/ThreadGroupGui.java
   jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/ProxyControl.java
   jakarta/jmeter/trunk/src/reports/org/apache/jmeter/testelement/ReportPlan.java
   jakarta/jmeter/trunk/xdocs/changes.xml

There were a few changes needed:
- AbstractThreadGroupGui.configureTestElement() needed to call super.configureTestElement()
- Constructors should not call overridable methods; changed init() and added initGui() to AbstractThreadGroupGui
- patch included a change to TCPSampler which had already been made (and was irrelevant)
- no need to patch JMeterVersion
Comment 9 The ASF infrastructure team 2022-09-24 20:37:44 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/2343