The JMeter variable "sample_variables" is sent to all server instances to ensure the data is available to the client.

git-svn-id: https://svn.apache.org/repos/asf/jakarta/jmeter/trunk@744592 13f79535-47bb-0310-9956-ffa450edef68

Former-commit-id: 2599772fc5
This commit is contained in:
Sebastian Bazley 2009-02-15 01:15:11 +00:00
parent 416ab89bd2
commit 8561038da7
5 changed files with 13 additions and 1 deletions

View File

@ -333,6 +333,8 @@ log_level.jorphan=INFO
#sample_variables=SESSION_ID,REFERENCE
# N.B. The current implementation saves the values in XML as attributes,
# so the names must be valid XML names.
# Versions of JMeter after 2.3.2 send the variable to all servers
# to ensure that the correct data is available at the client.
# Optional xml processing instruction for line 2 of the file:
#jmeter.save.saveservice.xml_pi=<?xml-stylesheet type="text/xsl" href="../extras/jmeter-results-detail-report_21.xsl"?>

View File

@ -61,6 +61,7 @@ import org.apache.jmeter.plugin.PluginManager;
import org.apache.jmeter.reporters.ResultCollector;
import org.apache.jmeter.reporters.Summariser;
import org.apache.jmeter.samplers.Remoteable;
import org.apache.jmeter.samplers.SampleEvent;
import org.apache.jmeter.save.SaveService;
import org.apache.jmeter.services.FileServer;
import org.apache.jmeter.testelement.TestElement;
@ -640,6 +641,10 @@ public class JMeter implements JMeterPlugin {
}
}
String sample_variables = (String) jmeterProps.get(SampleEvent.SAMPLE_VARIABLES);
if (sample_variables != null){
remoteProps.put(SampleEvent.SAMPLE_VARIABLES, sample_variables);
}
}
/*

View File

@ -36,6 +36,8 @@ public class SampleEvent implements Serializable {
private static final long serialVersionUID = 232L;
public static final String SAMPLE_VARIABLES = "sample_variables"; // $NON-NLS-1$
public static final String HOSTNAME;
// List of variable names to be saved in JTL files
@ -55,7 +57,7 @@ public class SampleEvent implements Serializable {
}
HOSTNAME=hn;
String vars = JMeterUtils.getProperty("sample_variables"); // $NON-NLS-1$
String vars = JMeterUtils.getProperty(SAMPLE_VARIABLES);
variableNames=vars != null ? vars.split(",") : new String[0];
varCount=variableNames.length;
if (varCount>0){

View File

@ -186,6 +186,7 @@ These are implemented in the AbstractTestElement class which all elements should
<li>Mailer Visualiser - fix parsing of multiple e-mail address when using Test button</li>
<li>Bug 46435 - More verbose error msg for error 501 (Proxy Server)</li>
<li>Bug 46491 - Incorrect value for the last variable in "CSV Data Set Config" (error in processing quoted strings)</li>
<li>The JMeter variable "sample_variables" is sent to all server instances to ensure the data is available to the client.</li>
</ul>
<h3>Improvements</h3>

View File

@ -170,6 +170,8 @@ sampleresult.timestamp.start=true
#sample_variables=SESSION_ID,REFERENCE
# N.B. The current implementation saves the values in XML as attributes,
# so the names must be valid XML names.
# Versions of JMeter after 2.3.2 send the variable to all servers
# to ensure that the correct data is available at the client.
# Optional xml processing instruction for line 2 of the file:
#jmeter.save.saveservice.xml_pi=&amp;lt;?xml-stylesheet type="text/xsl" href="sample.xsl"?>