You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by pm...@apache.org on 2016/01/06 22:15:47 UTC
svn commit: r1723413 - in /jmeter/trunk:
src/core/org/apache/jmeter/config/gui/ArgumentsPanel.java
src/protocol/http/org/apache/jmeter/protocol/http/gui/HTTPArgumentsPanel.java
xdocs/changes.xml
Author: pmouawad
Date: Wed Jan 6 21:15:47 2016
New Revision: 1723413
URL: http://svn.apache.org/viewvc?rev=1723413&view=rev
Log:
Bug 58811 - When pasting arguments between http samplers the column "Encode" and "Include Equals" are lost.
#resolve #66
Bugzilla Id: 58811
Modified:
jmeter/trunk/src/core/org/apache/jmeter/config/gui/ArgumentsPanel.java
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/HTTPArgumentsPanel.java
jmeter/trunk/xdocs/changes.xml
Modified: jmeter/trunk/src/core/org/apache/jmeter/config/gui/ArgumentsPanel.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/config/gui/ArgumentsPanel.java?rev=1723413&r1=1723412&r2=1723413&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/config/gui/ArgumentsPanel.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/config/gui/ArgumentsPanel.java Wed Jan 6 21:15:47 2016
@@ -485,14 +485,7 @@ public class ArgumentsPanel extends Abst
for (String clipboardLine : clipboardLines) {
String[] clipboardCols = clipboardLine.split("\t");
if (clipboardCols.length > 0) {
- Argument argument = makeNewArgument();
- argument.setName(clipboardCols[0]);
- if (clipboardCols.length > 1) {
- argument.setValue(clipboardCols[1]);
- if (clipboardCols.length > 2) {
- argument.setDescription(clipboardCols[2]);
- }
- }
+ Argument argument = createArgumentFromClipboard(clipboardCols);
tableModel.addRow(argument);
}
}
@@ -515,6 +508,18 @@ public class ArgumentsPanel extends Abst
}
}
+ protected Argument createArgumentFromClipboard(String[] clipboardCols) {
+ Argument argument = makeNewArgument();
+ argument.setName(clipboardCols[0]);
+ if (clipboardCols.length > 1) {
+ argument.setValue(clipboardCols[1]);
+ if (clipboardCols.length > 2) {
+ argument.setDescription(clipboardCols[2]);
+ }
+ }
+ return argument;
+ }
+
/**
* Create a new Argument object.
*
Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/HTTPArgumentsPanel.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/HTTPArgumentsPanel.java?rev=1723413&r1=1723412&r2=1723413&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/HTTPArgumentsPanel.java (original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/HTTPArgumentsPanel.java Wed Jan 6 21:15:47 2016
@@ -22,6 +22,8 @@ import java.util.Iterator;
import javax.swing.JTable;
+import org.apache.commons.lang3.BooleanUtils;
+import org.apache.jmeter.config.Argument;
import org.apache.jmeter.config.Arguments;
import org.apache.jmeter.config.gui.ArgumentsPanel;
import org.apache.jmeter.protocol.http.util.HTTPArgument;
@@ -135,4 +137,29 @@ public class HTTPArgumentsPanel extends
return arg.getMetaData() == null || arg.getMetaData().equals("=")
|| (arg.getValue() != null && arg.getValue().length() > 0);
}
+
+ @Override
+ protected Argument createArgumentFromClipboard(String[] clipboardCols) {
+ HTTPArgument argument = makeNewArgument();
+ argument.setName(clipboardCols[0]);
+ if (clipboardCols.length > 1) {
+ argument.setValue(clipboardCols[1]);
+
+ if (clipboardCols.length > 2) {
+
+ // default to false if the string is not a boolean
+ argument.setAlwaysEncoded(Boolean.parseBoolean(clipboardCols[2]));
+
+ if (clipboardCols.length > 3) {
+ Boolean useEqual = BooleanUtils.toBooleanObject(clipboardCols[3]);
+ // default to true if the string is not a boolean
+ argument.setUseEquals(useEqual!=null?useEqual.booleanValue():true);
+ }
+ }
+ }
+
+ return argument;
+ }
+
+
}
Modified: jmeter/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1723413&r1=1723412&r2=1723413&view=diff
==============================================================================
--- jmeter/trunk/xdocs/changes.xml (original)
+++ jmeter/trunk/xdocs/changes.xml Wed Jan 6 21:15:47 2016
@@ -95,6 +95,7 @@ Summary
<ul>
<li><bug>57696</bug>HTTP Request : Improve responseMessage when resource download fails. Contributed by Ubik Load Pack (support at ubikloadpack.com)</li>
<li><bug>57995</bug>Use FileServer for HTTP Request files. Implemented by Andrey Pokhilko (andrey at blazemeter.com) and contributed by BlazeMeter Ltd.</li>
+ <li><bug>58811</bug>When pasting arguments between http samplers the column "Encode" and "Include Equals" are lost. Contributed by Benoit Wiart (benoit dot wiart at gmail.com)</li>
</ul>
<h3>Other samplers</h3>