jmeter icon indicating copy to clipboard operation
jmeter copied to clipboard

The Throughtput Controller Can't Take The variables Fair From CSV Data set Config maybe

Open asfimport opened this issue 3 years ago • 0 comments

TaoLu (Bug 66116): When there are multiple controllers, it is found that the distribution of values is uneven

the result file: timeStamp,elapsed,label,threadName,success,URL 1655192394865,0,BeanShell Sampler3,Thread Group 1-1,true,http://2.2.2.2:22/hi 1655192394865,0,BeanShell Sampler2,Thread Group 1-1,true,http://1.1.1.1:22/hi 1655192394865,0,BeanShell Sampler1,Thread Group 1-1,true,http://2.2.2.2:22/hi 1655192394865,0,BeanShell Sampler3,Thread Group 1-1,true,http://2.2.2.2:22/hi 1655192394865,0,BeanShell Sampler2,Thread Group 1-1,true,http://2.2.2.2:22/hi 1655192394865,0,BeanShell Sampler3,Thread Group 1-1,true,http://1.1.1.1:22/hi ...

count 1.1.1.1=200 count 2.2.2.2=400

The desired result is that the sampler sends the same number of requests to both host Is there any other good way

Created attachment Test%20Plan.jmx: The Jmx script

Test%20Plan.jmx
<?xml version="1.0" encoding="UTF-8"?>
<jmeterTestPlan version="1.2" properties="5.0" jmeter="5.4.3">
  <hashTree>
    <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true">
      <stringProp name="TestPlan.comments"></stringProp>
      <boolProp name="TestPlan.functional_mode">false</boolProp>
      <boolProp name="TestPlan.tearDown_on_shutdown">true</boolProp>
      <boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
      <elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
        <collectionProp name="Arguments.arguments"/>
      </elementProp>
      <stringProp name="TestPlan.user_define_classpath"></stringProp>
    </TestPlan>
    <hashTree>
      <ResultCollector guiclass="StatVisualizer" testclass="ResultCollector" testname="Aggregate Report" enabled="true">
        <boolProp name="ResultCollector.error_logging">false</boolProp>
        <objProp>
          <name>saveConfig</name>
          <value class="SampleSaveConfiguration">
            <time>true</time>
            <latency>false</latency>
            <timestamp>true</timestamp>
            <success>true</success>
            <label>true</label>
            <code>false</code>
            <message>false</message>
            <threadName>true</threadName>
            <dataType>false</dataType>
            <encoding>false</encoding>
            <assertions>false</assertions>
            <subresults>false</subresults>
            <responseData>false</responseData>
            <samplerData>false</samplerData>
            <xml>false</xml>
            <fieldNames>true</fieldNames>
            <responseHeaders>false</responseHeaders>
            <requestHeaders>false</requestHeaders>
            <responseDataOnError>false</responseDataOnError>
            <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
            <assertionsResultsToSave>0</assertionsResultsToSave>
            <url>true</url>
          </value>
        </objProp>
        <stringProp name="filename">res/220614/1429</stringProp>
      </ResultCollector>
      <hashTree/>
      <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Thread Group" enabled="true">
        <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
        <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
          <boolProp name="LoopController.continue_forever">false</boolProp>
          <stringProp name="LoopController.loops">100</stringProp>
        </elementProp>
        <stringProp name="ThreadGroup.num_threads">10</stringProp>
        <stringProp name="ThreadGroup.ramp_time">1</stringProp>
        <boolProp name="ThreadGroup.scheduler">false</boolProp>
        <stringProp name="ThreadGroup.duration"></stringProp>
        <stringProp name="ThreadGroup.delay"></stringProp>
        <boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp>
      </ThreadGroup>
      <hashTree>
        <CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="CSV Data Set Config" enabled="true">
          <stringProp name="delimiter">,</stringProp>
          <stringProp name="fileEncoding"></stringProp>
          <stringProp name="filename">ip.csv</stringProp>
          <boolProp name="ignoreFirstLine">false</boolProp>
          <boolProp name="quotedData">false</boolProp>
          <boolProp name="recycle">true</boolProp>
          <stringProp name="shareMode">shareMode.all</stringProp>
          <boolProp name="stopThread">false</boolProp>
          <stringProp name="variableNames">ip</stringProp>
        </CSVDataSet>
        <hashTree/>
        <ThroughputController guiclass="ThroughputControllerGui" testclass="ThroughputController" testname="Throughput Controller" enabled="true">
          <intProp name="ThroughputController.style">1</intProp>
          <boolProp name="ThroughputController.perThread">false</boolProp>
          <intProp name="ThroughputController.maxThroughput">1</intProp>
          <FloatProperty>
            <name>ThroughputController.percentThroughput</name>
            <value>10.0</value>
            <savedValue>0.0</savedValue>
          </FloatProperty>
        </ThroughputController>
        <hashTree>
          <BeanShellSampler guiclass="BeanShellSamplerGui" testclass="BeanShellSampler" testname="BeanShell Sampler1" enabled="true">
            <stringProp name="BeanShellSampler.query">import java.net.MalformedURLException;
import java.net.URL;
url = new URL(&quot;http&quot;, bsh.args[0], 22, &quot;/hi&quot;);
SampleResult.setURL(url);</stringProp>
            <stringProp name="BeanShellSampler.filename"></stringProp>
            <stringProp name="BeanShellSampler.parameters">${ip}</stringProp>
            <boolProp name="BeanShellSampler.resetInterpreter">false</boolProp>
          </BeanShellSampler>
          <hashTree/>
        </hashTree>
        <ThroughputController guiclass="ThroughputControllerGui" testclass="ThroughputController" testname="Throughput Controller" enabled="true">
          <intProp name="ThroughputController.style">1</intProp>
          <boolProp name="ThroughputController.perThread">false</boolProp>
          <intProp name="ThroughputController.maxThroughput">1</intProp>
          <FloatProperty>
            <name>ThroughputController.percentThroughput</name>
            <value>20.0</value>
            <savedValue>0.0</savedValue>
          </FloatProperty>
        </ThroughputController>
        <hashTree>
          <BeanShellSampler guiclass="BeanShellSamplerGui" testclass="BeanShellSampler" testname="BeanShell Sampler2" enabled="true">
            <stringProp name="BeanShellSampler.query">import java.net.MalformedURLException;
import java.net.URL;
url = new URL(&quot;http&quot;, bsh.args[0], 22, &quot;/hi&quot;);
SampleResult.setURL(url);</stringProp>
            <stringProp name="BeanShellSampler.filename"></stringProp>
            <stringProp name="BeanShellSampler.parameters">${ip}</stringProp>
            <boolProp name="BeanShellSampler.resetInterpreter">false</boolProp>
          </BeanShellSampler>
          <hashTree/>
        </hashTree>
        <ThroughputController guiclass="ThroughputControllerGui" testclass="ThroughputController" testname="Throughput Controller" enabled="true">
          <intProp name="ThroughputController.style">1</intProp>
          <boolProp name="ThroughputController.perThread">false</boolProp>
          <intProp name="ThroughputController.maxThroughput">1</intProp>
          <FloatProperty>
            <name>ThroughputController.percentThroughput</name>
            <value>30.0</value>
            <savedValue>0.0</savedValue>
          </FloatProperty>
        </ThroughputController>
        <hashTree>
          <BeanShellSampler guiclass="BeanShellSamplerGui" testclass="BeanShellSampler" testname="BeanShell Sampler3" enabled="true">
            <stringProp name="BeanShellSampler.query">import java.net.MalformedURLException;
import java.net.URL;
url = new URL(&quot;http&quot;, bsh.args[0], 22, &quot;/hi&quot;);
SampleResult.setURL(url);</stringProp>
            <stringProp name="BeanShellSampler.filename"></stringProp>
            <stringProp name="BeanShellSampler.parameters">${ip}</stringProp>
            <boolProp name="BeanShellSampler.resetInterpreter">false</boolProp>
          </BeanShellSampler>
          <hashTree/>
        </hashTree>
      </hashTree>
    </hashTree>
  </hashTree>
</jmeterTestPlan>

Severity: major OS:

asfimport avatar Jun 14 '22 08:06 asfimport