jmeter icon indicating copy to clipboard operation
jmeter copied to clipboard

Module Controller included in a Thread Group with the same name as linked Test Fragment loses link after reopening saved test plan

Open asfimport opened this issue 8 years ago • 0 comments

juergen.plasser (Bug 60756): I have test plan including a simple test fragment and multiple thread groups (two in my case), both including a module controller linked to the aforementioned test fragment.

It happens that when a thread group is simply named like the linked test fragment (in my attached jmx they are named "Test Fragment") the link is lost in the UI client after reopening the test plan.

Running the test leads to a SOE:

2017/02/21 12:38:55 ERROR - jmeter.JMeter: Uncaught exception: java.lang.StackOverflowError at java.util.HashMap.hash(HashMap.java:338) at java.util.LinkedHashMap.get(LinkedHashMap.java:440) at java.util.Collections$SynchronizedMap.get(Collections.java:2584) at org.apache.jmeter.testelement.AbstractTestElement.getProperty(AbstractTestElement.java:184) at org.apache.jmeter.testelement.AbstractTestElement.isEnabled(AbstractTestElement.java:627) at org.apache.jmeter.gui.tree.JMeterTreeNode.isEnabled(JMeterTreeNode.java:66) at org.apache.jmeter.JMeter.convertSubTree(JMeter.java:1002) at org.apache.jmeter.JMeter.convertSubTree(JMeter.java:1020) at org.apache.jmeter.JMeter.convertSubTree(JMeter.java:1014) at org.apache.jmeter.JMeter.convertSubTree(JMeter.java:1020) at org.apache.jmeter.JMeter.convertSubTree(JMeter.java:1014)...

Created attachment testplan.jmx: Proof of concept

testplan.jmx
<?xml version="1.0" encoding="UTF-8"?>
<jmeterTestPlan version="1.2" properties="3.1" jmeter="3.1 r1770033">
  <hashTree>
    <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Testplan" enabled="true">
      <stringProp name="TestPlan.comments"></stringProp>
      <boolProp name="TestPlan.functional_mode">false</boolProp>
      <boolProp name="TestPlan.serialize_threadgroups">true</boolProp>
      <elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
        <collectionProp name="Arguments.arguments">
          <elementProp name="encoding" elementType="Argument">
            <stringProp name="Argument.name">encoding</stringProp>
            <stringProp name="Argument.value">UTF-8</stringProp>
            <stringProp name="Argument.metadata">=</stringProp>
          </elementProp>
          <elementProp name="timeout" elementType="Argument">
            <stringProp name="Argument.name">timeout</stringProp>
            <stringProp name="Argument.value">60000</stringProp>
            <stringProp name="Argument.metadata">=</stringProp>
          </elementProp>
        </collectionProp>
      </elementProp>
      <stringProp name="TestPlan.user_define_classpath"></stringProp>
    </TestPlan>
    <hashTree>
      <TestFragmentController guiclass="TestFragmentControllerGui" testclass="TestFragmentController" testname="Test Fragment" enabled="true"/>
      <hashTree>
        <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Sample Request" enabled="true">
          <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
          <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
            <collectionProp name="Arguments.arguments">
              <elementProp name="" elementType="HTTPArgument">
                <boolProp name="HTTPArgument.always_encode">false</boolProp>
                <stringProp name="Argument.value"></stringProp>
                <stringProp name="Argument.metadata">=</stringProp>
              </elementProp>
            </collectionProp>
          </elementProp>
          <stringProp name="HTTPSampler.domain"></stringProp>
          <stringProp name="HTTPSampler.port"></stringProp>
          <stringProp name="HTTPSampler.connect_timeout"></stringProp>
          <stringProp name="HTTPSampler.response_timeout"></stringProp>
          <stringProp name="HTTPSampler.protocol"></stringProp>
          <stringProp name="HTTPSampler.contentEncoding">utf-8</stringProp>
          <stringProp name="HTTPSampler.path">/here/there/</stringProp>
          <stringProp name="HTTPSampler.method">GET</stringProp>
          <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
          <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
          <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
          <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
          <boolProp name="HTTPSampler.monitor">false</boolProp>
          <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
        </HTTPSamplerProxy>
        <hashTree>
          <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
            <collectionProp name="Asserion.test_strings">
              <stringProp name="-1301790688">assert something</stringProp>
            </collectionProp>
            <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
            <boolProp name="Assertion.assume_success">false</boolProp>
            <intProp name="Assertion.test_type">1</intProp>
          </ResponseAssertion>
          <hashTree/>
        </hashTree>
      </hashTree>
      <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Thread Group 1" enabled="true">
        <stringProp name="TestPlan.comments">	</stringProp>
        <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">3</stringProp>
        </elementProp>
        <stringProp name="ThreadGroup.num_threads">1</stringProp>
        <stringProp name="ThreadGroup.ramp_time">1</stringProp>
        <longProp name="ThreadGroup.start_time">1472038416000</longProp>
        <longProp name="ThreadGroup.end_time">1472038416000</longProp>
        <boolProp name="ThreadGroup.scheduler">false</boolProp>
        <stringProp name="ThreadGroup.duration"></stringProp>
        <stringProp name="ThreadGroup.delay"></stringProp>
      </ThreadGroup>
      <hashTree>
        <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true">
          <stringProp name="ConstantTimer.delay">500</stringProp>
        </ConstantTimer>
        <hashTree/>
        <ModuleController guiclass="ModuleControllerGui" testclass="ModuleController" testname="Link to TF" enabled="true">
          <collectionProp name="ModuleController.node_path">
            <stringProp name="-1227702913">WorkBench</stringProp>
            <stringProp name="-1081304357">Testplan</stringProp>
            <stringProp name="170071582">Test Fragment</stringProp>
          </collectionProp>
        </ModuleController>
        <hashTree/>
      </hashTree>
      <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Test Fragment" enabled="true">
        <stringProp name="TestPlan.comments">	</stringProp>
        <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">3</stringProp>
        </elementProp>
        <stringProp name="ThreadGroup.num_threads">1</stringProp>
        <stringProp name="ThreadGroup.ramp_time">1</stringProp>
        <longProp name="ThreadGroup.start_time">1472038416000</longProp>
        <longProp name="ThreadGroup.end_time">1472038416000</longProp>
        <boolProp name="ThreadGroup.scheduler">false</boolProp>
        <stringProp name="ThreadGroup.duration"></stringProp>
        <stringProp name="ThreadGroup.delay"></stringProp>
      </ThreadGroup>
      <hashTree>
        <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true">
          <stringProp name="ConstantTimer.delay">500</stringProp>
        </ConstantTimer>
        <hashTree/>
        <ModuleController guiclass="ModuleControllerGui" testclass="ModuleController" testname="Link to TF" enabled="true">
          <collectionProp name="ModuleController.node_path">
            <stringProp name="-1227702913">WorkBench</stringProp>
            <stringProp name="-1081304357">Testplan</stringProp>
            <stringProp name="170071582">Test Fragment</stringProp>
          </collectionProp>
        </ModuleController>
        <hashTree/>
      </hashTree>
    </hashTree>
  </hashTree>
</jmeterTestPlan>

Severity: normal OS: All

Duplicates:

  • https://github.com/apache/jmeter/issues/5425

Depends on:

  • https://github.com/apache/jmeter/issues/3180

asfimport avatar Feb 21 '17 11:02 asfimport