Bug 50490 - Setup and Post Thread Group enhancements for better test flow.
Summary: Setup and Post Thread Group enhancements for better test flow.
Status: RESOLVED FIXED
Alias: None
Product: JMeter - Now in Github
Classification: Unclassified
Component: Main (show other bugs)
Version: Nightly (Please specify date)
Hardware: Macintosh All
: P2 enhancement (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-16 16:02 UTC by ansoni
Modified: 2010-12-17 12:00 UTC (History)
0 users



Attachments
Patch of JMeter Engine and documentation for fix (10.12 KB, patch)
2010-12-16 16:03 UTC, ansoni
Details | Diff
New Files include classes and document images (60.09 KB, application/zip)
2010-12-16 16:04 UTC, ansoni
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ansoni 2010-12-16 16:02:42 UTC
Patch generated against revision 1050154(current as of a few minutes ago).

A common problem that my team has had and one that I recently saw on the User-list is the need to execute pre and post test actions.  The traditional way to do this is by using 3 threads with "Run Thread Groups consecutively".  Unfortunately, this highly constrains the flow of the test.

A simple fix to this is to have 2 special Thread Group elements that will behave like normal Thread Groups except that they are executed before or after a test.  The idea here is that a "Setup Thread Group" can be used for activities like creating accounts, setup of test monitoring, ... etc.  The "Post Thread Group" would be for cleanup activities or even the posting of Test Results via a BSH Sampler or custom Java class.

Overall, the idea behind this patch is to simplify the more advanced test plans with better organization and easier to follow flows.

I will be Attaching a zip file and a patch.  The zip contains all the new additions to the source tree.

The patch includes the updates to the JMeter Engine and documentation.
Comment 1 ansoni 2010-12-16 16:03:42 UTC
Created attachment 26416 [details]
Patch of JMeter Engine and documentation for fix
Comment 2 ansoni 2010-12-16 16:04:34 UTC
Created attachment 26417 [details]
New Files include classes and document images
Comment 3 Sebb 2010-12-17 11:57:34 UTC
Thanks very much - a very useful enhancement.

Code committed to SVN:

URL: http://svn.apache.org/viewvc?rev=1050447&view=rev
Log:
Bug 50490 - Setup and Post Thread Group enhancements for better test flow.

Added:
   jakarta/jmeter/trunk/docs/images/screenshots/post_thread_group.png   (with props)
   jakarta/jmeter/trunk/docs/images/screenshots/setup_thread_group.png   (with props)
   jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/PostThreadGroup.java   (with props)
   jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/SetupThreadGroup.java   (with props)
   jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/gui/PostThreadGroupGui.java   (with props)
   jakarta/jmeter/trunk/src/core/org/apache/jmeter/threads/gui/SetupThreadGroupGui.java   (with props)
   jakarta/jmeter/trunk/xdocs/images/screenshots/post_thread_group.png   (with props)
   jakarta/jmeter/trunk/xdocs/images/screenshots/setup_thread_group.png   (with props)
Modified:
   jakarta/jmeter/trunk/bin/saveservice.properties
   jakarta/jmeter/trunk/src/core/org/apache/jmeter/engine/StandardJMeterEngine.java
   jakarta/jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties
   jakarta/jmeter/trunk/xdocs/changes.xml
   jakarta/jmeter/trunk/xdocs/usermanual/component_reference.xml


I had to make some changes to the StandardJMeterEngine code, as it was detecting end of test after the setup and post groups as well as after normal thread groups. Also the code now checks for the presence of setup/post groups before processing them and logging messages for them.

Also the messages.properties update was missing from the patch.
Comment 4 The ASF infrastructure team 2022-09-24 20:37:45 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/2444