Author: sebb
Date: Fri Nov 20 19:08:18 2009
New Revision: 882684
URL: http://svn.apache.org/viewvc?rev=882684&view=rev
Log:
Bug 47946 - Proxy should enable Grouping inside a Transaction Controller
Modified:
jakarta/jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties
jakarta/jmeter/trunk/src/core/org/apache/jmeter/resources/messages_fr.properties
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/ProxyControl.java
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/gui/ProxyControlGui.java
jakarta/jmeter/trunk/xdocs/changes.xml
jakarta/jmeter/trunk/xdocs/usermanual/component_reference.xml
Modified:
jakarta/jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties
URL:
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties?rev=882684&r1=882683&r2=882684&view=diff
==============================================================================
---
jakarta/jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties
(original)
+++
jakarta/jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties
Fri Nov 20 19:08:18 2009
@@ -287,6 +287,7 @@
graph_results_title=Graph Results
grouping_add_separators=Add separators between groups
grouping_in_controllers=Put each group in a new controller
+grouping_in_transaction_controllers=Put each group in a new transaction
controller
grouping_mode=Grouping\:
grouping_no_groups=Do not group samplers
grouping_store_first_only=Store 1st sampler of each group only
@@ -846,6 +847,7 @@
tr=Turkish
transaction_controller_parent=Generate parent sample
transaction_controller_title=Transaction Controller
+transaction_controller_include_timers=Include timer duration in runtime
summary.
unbind=Thread Unbind
unescape_html_string=String to unescape
unescape_string=String containing Java escapes
Modified:
jakarta/jmeter/trunk/src/core/org/apache/jmeter/resources/messages_fr.properties
URL:
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/resources/messages_fr.properties?rev=882684&r1=882683&r2=882684&view=diff
==============================================================================
---
jakarta/jmeter/trunk/src/core/org/apache/jmeter/resources/messages_fr.properties
(original)
+++
jakarta/jmeter/trunk/src/core/org/apache/jmeter/resources/messages_fr.properties
Fri Nov 20 19:08:18 2009
@@ -260,6 +260,7 @@
graph_results_title=Graphique de r\u00E9sultats
grouping_add_separators=Ajouter des s\u00E9parateurs entre les groupes
grouping_in_controllers=Mettre chaque groupe dans un nouveau contr\u00F4leur
+grouping_in_transaction_controllers=Mettre chaque groupe dans un nouveau
contr\u00F4leur de transaction
grouping_mode=Grouper \:
grouping_no_groups=Ne pas grouper les \u00E9chantillons
grouping_store_first_only=Stocker le 1er \u00E9chantillon pour chaque groupe
uniquement
@@ -718,6 +719,7 @@
tr=Turc
transaction_controller_parent=G\u00E9n\u00E9rer en \u00E9chantillon parent
transaction_controller_title=Contr\u00F4leur Transaction
+transaction_controller_include_timers=Inclure le temps de timer dans la duree.
unbind=D\u00E9connexion de l'unit\u00E9
uniform_timer_delay=D\u00E9lai de d\u00E9calage constant (en millisecondes) \:
uniform_timer_memo=Ajoute un d\u00E9lai al\u00E9atoire avec une distribution
uniforme
Modified:
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/ProxyControl.java
URL:
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/ProxyControl.java?rev=882684&r1=882683&r2=882684&view=diff
==============================================================================
---
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/ProxyControl.java
(original)
+++
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/ProxyControl.java
Fri Nov 20 19:08:18 2009
@@ -33,7 +33,9 @@
import org.apache.jmeter.config.ConfigElement;
import org.apache.jmeter.config.ConfigTestElement;
import org.apache.jmeter.control.GenericController;
+import org.apache.jmeter.control.TransactionController;
import org.apache.jmeter.control.gui.LogicControllerGui;
+import org.apache.jmeter.control.gui.TransactionControllerGui;
import org.apache.jmeter.engine.util.ValueReplacer;
import org.apache.jmeter.exceptions.IllegalUserActionException;
import org.apache.jmeter.functions.InvalidVariableException;
@@ -79,6 +81,9 @@
private static final String ASSERTION_GUI = AssertionGui.class.getName();
+
+ private static final String TRANSACTION_CONTROLLER_GUI =
TransactionControllerGui.class.getName();
+
private static final String LOGIC_CONTROLLER_GUI =
LogicControllerGui.class.getName();
private static final String HEADER_PANEL = HeaderPanel.class.getName();
@@ -125,13 +130,13 @@
private static final String CONTENT_TYPE_INCLUDE =
"ProxyControlGui.content_type_include"; // $NON-NLS-1$
//- JMX file attributes
- public static final int GROUPING_NO_GROUPS = 0;
-
- public static final int GROUPING_ADD_SEPARATORS = 1;
-
- public static final int GROUPING_IN_CONTROLLERS = 2;
-
- public static final int GROUPING_STORE_FIRST_ONLY = 3;
+ // Must agree with the order of entries in the drop-down
+ // created in ProxyControlGui.createGroupingPanel()
+ //private static final int GROUPING_NO_GROUPS = 0;
+ private static final int GROUPING_ADD_SEPARATORS = 1;
+ private static final int GROUPING_IN_SIMPLE_CONTROLLERS = 2;
+ private static final int GROUPING_STORE_FIRST_ONLY = 3;
+ private static final int GROUPING_IN_TRANSACTION_CONTROLLERS = 4;
// Must agree with the order of entries in the drop-down
// created in ProxyControlGui.createHTTPSamplerPanel()
@@ -547,6 +552,23 @@
}
/**
+ * Helper method to add a Transaction Controller to contain the samplers.
+ *
+ * @param model
+ * Test component tree model
+ * @param node
+ * Node in the tree where we will add the Controller
+ * @param name
+ * A name for the Controller
+ */
+ private void addTransactionController(JMeterTreeModel model,
JMeterTreeNode node, String name)
+ throws IllegalUserActionException {
+ TransactionController sc = new TransactionController();
+ sc.setProperty(TestElement.GUI_CLASS, TRANSACTION_CONTROLLER_GUI);
+ sc.setName(name);
+ model.addComponent(sc, node);
+ }
+ /**
* Helpler method to replicate any timers found within the Proxy Controller
* into the provided sampler, while replacing any occurences of string _T_
* in the timer's configuration with the provided deltaT.
@@ -733,9 +755,12 @@
if (!myTarget.isLeaf() && groupingMode ==
GROUPING_ADD_SEPARATORS) {
addDivider(treeModel, myTarget);
}
- if (groupingMode == GROUPING_IN_CONTROLLERS) {
+ if (groupingMode == GROUPING_IN_SIMPLE_CONTROLLERS) {
addSimpleController(treeModel, myTarget,
sampler.getName());
}
+ if (groupingMode == GROUPING_IN_TRANSACTION_CONTROLLERS) {
+ addTransactionController(treeModel, myTarget,
sampler.getName());
+ }
firstInBatch = true;// Remember this was first in its batch
}
if (lastTime == 0) {
@@ -754,7 +779,8 @@
sampler.setImageParser(true);
}
- if (groupingMode == GROUPING_IN_CONTROLLERS) {
+ if (groupingMode == GROUPING_IN_SIMPLE_CONTROLLERS ||
+ groupingMode == GROUPING_IN_TRANSACTION_CONTROLLERS) {
// Find the last controller in the target to store the
// sampler there:
for (int i = myTarget.getChildCount() - 1; i >= 0; i--) {
Modified:
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/gui/ProxyControlGui.java
URL:
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/gui/ProxyControlGui.java?rev=882684&r1=882683&r2=882684&view=diff
==============================================================================
---
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/gui/ProxyControlGui.java
(original)
+++
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/gui/ProxyControlGui.java
Fri Nov 20 19:08:18 2009
@@ -621,6 +621,7 @@
m.addElement(JMeterUtils.getResString("grouping_add_separators")); //
$NON-NLS-1$
m.addElement(JMeterUtils.getResString("grouping_in_controllers")); //
$NON-NLS-1$
m.addElement(JMeterUtils.getResString("grouping_store_first_only"));
// $NON-NLS-1$
+
m.addElement(JMeterUtils.getResString("grouping_in_transaction_controllers"));
// $NON-NLS-1$
groupingMode = new JComboBox(m);
groupingMode.setSelectedIndex(0);
groupingMode.addItemListener(this);
Modified: jakarta/jmeter/trunk/xdocs/changes.xml
URL:
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/xdocs/changes.xml?rev=882684&r1=882683&r2=882684&view=diff
==============================================================================
--- jakarta/jmeter/trunk/xdocs/changes.xml (original)
+++ jakarta/jmeter/trunk/xdocs/changes.xml Fri Nov 20 19:08:18 2009
@@ -118,6 +118,7 @@
<li>Allow Proxy Server to be specified on HTTP Sampler GUI and HTTP Config
GUI</li>
<li>Bug 47461 - Update Cache Manager to handle Expires HTTP header</li>
<li>Bug 48153 - Support for Cache-Control and Expires headers</li>
+<li>Bug 47946 - Proxy should enable Grouping inside a Transaction
Controller</li>
</ul>
<h3>Other samplers</h3>
Modified: jakarta/jmeter/trunk/xdocs/usermanual/component_reference.xml
URL:
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/xdocs/usermanual/component_reference.xml?rev=882684&r1=882683&r2=882684&view=diff
==============================================================================
--- jakarta/jmeter/trunk/xdocs/usermanual/component_reference.xml (original)
+++ jakarta/jmeter/trunk/xdocs/usermanual/component_reference.xml Fri Nov 20
19:08:18 2009
@@ -4424,6 +4424,7 @@
<li>Add separators between groups: add a controller named
"--------------" to create a visual separation between the groups. Otherwise
the samplers are all stored sequentially.</li>
<li>Put each group in a new controller: create a new <complink
name="Simple Controller"/> for each group, and store all samplers for that
group in it.</li>
<li>Store 1st sampler of each group only: only the first request
in each group will be recorded. The "Follow Redirects" and "Retrieve All
Embedded Resources..." flags will be turned on in those samplers.</li>
+ <li>Put each group in a new transaction controller: create a new
<complink name="Transaction Controller"/> for each group, and store all
samplers for that group in it.</li>
</ul>
The property <b>proxy.pause</b> determines the minimum gap that
JMeter needs between requests
to treat them as separate "clicks". The default is 1000
(milliseconds) i.e. 1 second.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]