Bug 48749 - Allowing custom Thread Groups
Allowing custom Thread Groups
Status: RESOLVED FIXED
Product: JMeter
Classification: Unclassified
Component: Main
unspecified
PC Windows XP
: P2 enhancement (vote)
: ---
Assigned To: JMeter issues mailing list
:
Depends on:
Blocks: 48883
  Show dependency tree
 
Reported: 2010-02-16 09:45 UTC by Andrey Pohilko
Modified: 2010-03-10 07:28 UTC (History)
0 users



Attachments
Changes to source files (40.10 KB, patch)
2010-02-16 09:45 UTC, Andrey Pohilko
Details | Diff
new abstract ThreadGroup (5.82 KB, text/plain)
2010-02-16 09:46 UTC, Andrey Pohilko
Details
new abstract ThreadGroupGui (5.43 KB, text/plain)
2010-02-16 09:46 UTC, Andrey Pohilko
Details
Proposed source code changes (39.85 KB, patch)
2010-02-16 10:26 UTC, Andrey Pohilko
Details | Diff
Proposed source code changes (39.85 KB, patch)
2010-02-16 10:37 UTC, Andrey Pohilko
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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