alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

JMeter example source code file (GuiTest.jmx)

This example JMeter source code file (GuiTest.jmx) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - JMeter tags/keywords

argument, arguments, config, configtestelement, controller, genericcontroller, genericcontroller, logiccontrollergui, logiccontrollergui, loopcontroller, resultcollector, resultcollector, threadgroup, threadgroup

The JMeter GuiTest.jmx source code

<?xml version="1.0" encoding="UTF-8"?>
<jmeterTestPlan version="1.2" properties="2.1">
  <hashTree>
    <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true">
      <collectionProp name="TestPlan.thread_groups"/>
      <elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
        <collectionProp name="Arguments.arguments">
          <elementProp name="server" elementType="Argument">
            <stringProp name="Argument.metadata">=
            <stringProp name="Argument.value">jakarta.apache.org
            <stringProp name="Argument.name">server
          </elementProp>
          <elementProp name="server" elementType="Argument">
            <stringProp name="Argument.metadata">=
            <stringProp name="Argument.value">jakarta.apache.org
            <stringProp name="Argument.name">server
          </elementProp>
        </collectionProp>
      </elementProp>
      <boolProp name="TestPlan.serialize_threadgroups">false
      <boolProp name="TestPlan.functional_mode">false
      <stringProp name="TestPlan.comments">
    </TestPlan>
    <hashTree>
      <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Components" enabled="true">
        <longProp name="ThreadGroup.start_time">0
        <stringProp name="ThreadGroup.delay">
        <stringProp name="ThreadGroup.duration">
        <stringProp name="ThreadGroup.num_threads">1
        <boolProp name="ThreadGroup.scheduler">false
        <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
          <boolProp name="LoopController.continue_forever">false
          <intProp name="LoopController.loops">-1
        </elementProp>
        <longProp name="ThreadGroup.end_time">0
        <stringProp name="ThreadGroup.on_sample_error">continue
        <stringProp name="ThreadGroup.ramp_time">1
      </ThreadGroup>
      <hashTree>
        <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="Assertions" enabled="true"/>
        <hashTree>
          <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Assertion" enabled="true">
            <collectionProp name="Asserion.test_strings">
              <stringProp name="0">
              <stringProp name="0">
              <stringProp name="0">
              <stringProp name="0">
              <stringProp name="0">
              <stringProp name="0">
              <stringProp name="0">
              <stringProp name="0">
            </collectionProp>
            <stringProp name="Assertion.test_field">Assertion.response_data
            <stringProp name="Assertion.assume_success">false
            <intProp name="Assertion.test_type">2
          </ResponseAssertion>
          <hashTree/>
          <DurationAssertion guiclass="DurationAssertionGui" testclass="DurationAssertion" testname="Duration Assertion" enabled="true">
            <longProp name="DurationAssertion.duration">0
          </DurationAssertion>
          <hashTree/>
          <SizeAssertion guiclass="SizeAssertionGui" testclass="SizeAssertion" testname="Size Assertion" enabled="true">
            <intProp name="SizeAssertion.operator">1
            <longProp name="SizeAssertion.size">0
          </SizeAssertion>
          <hashTree/>
          <XMLAssertion guiclass="XMLAssertionGui" testclass="XMLAssertion" testname="XML Assertion" enabled="true"/>
          <hashTree/>
        </hashTree>
        <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="Control" enabled="true"/>
        <hashTree>
          <InterleaveControl guiclass="InterleaveControlGui" testclass="InterleaveControl" testname="Interleave Controller" enabled="true">
            <intProp name="InterleaveControl.style">1
          </InterleaveControl>
          <hashTree/>
          <ModuleController guiclass="ModuleControllerGui" testclass="ModuleController" testname="ModuleController" enabled="true">
            <collectionProp name="ModuleController.node_path">
              <stringProp name="-1227702913">WorkBench
              <stringProp name="764597751">Test Plan
              <stringProp name="1546018614">Components
              <stringProp name="-209934895">Assertions
              <stringProp name="-209934895">Assertions
            </collectionProp>
          </ModuleController>
          <hashTree/>
          <OnceOnlyController guiclass="OnceOnlyControllerGui" testclass="OnceOnlyController" testname="Once Only Controller" enabled="true"/>
          <hashTree/>
          <RandomController guiclass="RandomControlGui" testclass="RandomController" testname="Random Controller" enabled="true">
            <intProp name="InterleaveControl.style">1
          </RandomController>
          <hashTree/>
          <ThroughputController guiclass="ThroughputControllerGui" testclass="ThroughputController" testname="Throughput Controller" enabled="true">
            <intProp name="ThroughputController.style">0
            <boolProp name="ThroughputController.perThread">true
            <intProp name="ThroughputController.maxThroughput">1
            <FloatProperty>
              <name>ThroughputController.percentThroughput
              <value>100.0
              <savedValue>0.0
            </FloatProperty>
          </ThroughputController>
          <hashTree/>
          <IfController guiclass="IfControllerPanel" testclass="IfController" testname="If Controller" enabled="true">
            <stringProp name="IfController.condition">${__threadNum()} == 3
          </IfController>
          <hashTree/>
        </hashTree>
        <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="Post Processors" enabled="true"/>
        <hashTree>
          <RegexExtractor guiclass="RegexExtractorGui" testclass="RegexExtractor" testname="Regular Expression Extractor" enabled="true">
            <stringProp name="RegexExtractor.default">
            <stringProp name="RegexExtractor.regex">
            <stringProp name="RegexExtractor.useHeaders">false
            <stringProp name="RegexExtractor.match_number">
            <stringProp name="RegexExtractor.template">
            <stringProp name="RegexExtractor.refname">
          </RegexExtractor>
          <hashTree/>
        </hashTree>
        <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="Pre Processors" enabled="true"/>
        <hashTree>
          <CounterConfig guiclass="CounterConfigGui" testclass="CounterConfig" testname="Counter Config" enabled="true">
            <stringProp name="CounterConfig.start">0
            <stringProp name="CounterConfig.incr">0
            <stringProp name="CounterConfig.name">
            <boolProp name="CounterConfig.per_user">false
            <stringProp name="CounterConfig.end">0
          </CounterConfig>
          <hashTree/>
          <UserParameters guiclass="UserParametersGui" testclass="UserParameters" testname="User Parameters" enabled="true">
            <collectionProp name="UserParameters.names">
              <stringProp name="username">username
              <stringProp name="password">password
              <stringProp name="category">category
              <stringProp name="color">color
            </collectionProp>
            <collectionProp name="UserParameters.thread_values">
              <collectionProp name="-1599762143">
                <stringProp name="user1">user1
                <stringProp name="pass1">pass1
                <stringProp name="cat1">cat1
                <stringProp name="red">red
              </collectionProp>
              <collectionProp name="2144649063">
                <stringProp name="user2">user2
                <stringProp name="pass2">pass2
                <stringProp name="cat2">cat2
                <stringProp name="green">green
              </collectionProp>
              <collectionProp name="-1601708465">
                <stringProp name="user3">user3
                <stringProp name="pass3">pass3
                <stringProp name="cat3">cat3
                <stringProp name="">
              </collectionProp>
            </collectionProp>
            <boolProp name="UserParameters.per_iteration">true
          </UserParameters>
          <hashTree/>
        </hashTree>
        <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="Timers" enabled="true"/>
        <hashTree>
          <ConstantThroughputTimer guiclass="TestBeanGUI" testclass="ConstantThroughputTimer" testname="Constant Throughput Timer" enabled="true">
            <stringProp name="throughput">60
            <boolProp name="legacyMode">false
          </ConstantThroughputTimer>
          <hashTree/>
          <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true">
            <stringProp name="ConstantTimer.delay">300
          </ConstantTimer>
          <hashTree/>
          <GaussianRandomTimer guiclass="GaussianRandomTimerGui" testclass="GaussianRandomTimer" testname="Gaussian Random Timer" enabled="true">
            <stringProp name="ConstantTimer.delay">300
            <stringProp name="RandomTimer.range">100.0
          </GaussianRandomTimer>
          <hashTree/>
          <UniformRandomTimer guiclass="UniformRandomTimerGui" testclass="UniformRandomTimer" testname="Uniform Random Timer" enabled="true">
            <stringProp name="ConstantTimer.delay">300
            <stringProp name="RandomTimer.range">100.0
          </UniformRandomTimer>
          <hashTree/>
        </hashTree>
        <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="Visualizers" enabled="true"/>
        <hashTree>
          <ResultCollector guiclass="AssertionVisualizer" testclass="ResultCollector" testname="Assertion Visualizer" enabled="true">
            <boolProp name="ResultCollector.error_logging">false
            <objProp>
              <name>saveConfig
              <value class="SampleSaveConfiguration">
                <time>true
                <latency>true
                <timestamp>true
                <success>true
                <label>true
                <code>true
                <message>true
                <threadName>false
                <dataType>true
                <encoding>true
                <assertions>false
                <subresults>false
                <responseData>false
                <samplerData>false
                <xml>true
                <fieldNames>true
                <responseHeaders>false
                <requestHeaders>false
                <responseDataOnError>false
                <saveAssertionResultsFailureMessage>false
                <assertionsResultsToSave>0
              </value>
            </objProp>
            <stringProp name="filename">
          </ResultCollector>
          <hashTree/>
          <ResultCollector guiclass="GraphAccumVisualizer" testclass="ResultCollector" testname="Graph Accum Visualizer" enabled="true">
            <boolProp name="ResultCollector.error_logging">false
            <objProp>
              <name>saveConfig
              <value class="SampleSaveConfiguration">
                <time>true
                <latency>true
                <timestamp>true
                <success>true
                <label>true
                <code>true
                <message>true
                <threadName>false
                <dataType>true
                <encoding>true
                <assertions>false
                <subresults>false
                <responseData>false
                <samplerData>false
                <xml>true
                <fieldNames>true
                <responseHeaders>false
                <requestHeaders>false
                <responseDataOnError>false
                <saveAssertionResultsFailureMessage>false
                <assertionsResultsToSave>0
              </value>
            </objProp>
            <stringProp name="filename">
          </ResultCollector>
          <hashTree/>
          <ResultCollector guiclass="GraphVisualizer" testclass="ResultCollector" testname="Graph Visualizer" enabled="true">
            <boolProp name="ResultCollector.error_logging">false
            <objProp>
              <name>saveConfig
              <value class="SampleSaveConfiguration">
                <time>true
                <latency>true
                <timestamp>true
                <success>true
                <label>true
                <code>true
                <message>true
                <threadName>false
                <dataType>true
                <encoding>true
                <assertions>false
                <subresults>false
                <responseData>false
                <samplerData>false
                <xml>true
                <fieldNames>true
                <responseHeaders>false
                <requestHeaders>false
                <responseDataOnError>false
                <saveAssertionResultsFailureMessage>false
                <assertionsResultsToSave>0
              </value>
            </objProp>
            <stringProp name="filename">
          </ResultCollector>
          <hashTree/>
          <ResultCollector guiclass="SimpleDataWriter" testclass="ResultCollector" testname="Simple Data Writer" enabled="true">
            <boolProp name="ResultCollector.error_logging">false
            <objProp>
              <name>saveConfig
              <value class="SampleSaveConfiguration">
                <time>true
                <latency>true
                <timestamp>true
                <success>true
                <label>true
                <code>true
                <message>true
                <threadName>false
                <dataType>true
                <encoding>true
                <assertions>false
                <subresults>false
                <responseData>false
                <samplerData>false
                <xml>true
                <fieldNames>true
                <responseHeaders>false
                <requestHeaders>false
                <responseDataOnError>false
                <saveAssertionResultsFailureMessage>false
                <assertionsResultsToSave>0
              </value>
            </objProp>
            <stringProp name="filename">
          </ResultCollector>
          <hashTree/>
          <ResultCollector guiclass="SplineVisualizer" testclass="ResultCollector" testname="Spline Visualizer" enabled="true">
            <boolProp name="ResultCollector.error_logging">false
            <objProp>
              <name>saveConfig
              <value class="SampleSaveConfiguration">
                <time>true
                <latency>true
                <timestamp>true
                <success>true
                <label>true
                <code>true
                <message>true
                <threadName>false
                <dataType>true
                <encoding>true
                <assertions>false
                <subresults>false
                <responseData>false
                <samplerData>false
                <xml>true
                <fieldNames>true
                <responseHeaders>false
                <requestHeaders>false
                <responseDataOnError>false
                <saveAssertionResultsFailureMessage>false
                <assertionsResultsToSave>0
              </value>
            </objProp>
            <stringProp name="filename">
          </ResultCollector>
          <hashTree/>
          <ResultCollector guiclass="StatVisualizer" testclass="ResultCollector" testname="StatVisualizer" enabled="true">
            <boolProp name="ResultCollector.error_logging">false
            <objProp>
              <name>saveConfig
              <value class="SampleSaveConfiguration">
                <time>true
                <latency>true
                <timestamp>true
                <success>true
                <label>true
                <code>true
                <message>true
                <threadName>false
                <dataType>true
                <encoding>true
                <assertions>false
                <subresults>false
                <responseData>false
                <samplerData>false
                <xml>true
                <fieldNames>true
                <responseHeaders>false
                <requestHeaders>false
                <responseDataOnError>false
                <saveAssertionResultsFailureMessage>false
                <assertionsResultsToSave>0
              </value>
            </objProp>
            <stringProp name="filename">
          </ResultCollector>
          <hashTree/>
          <ResultCollector guiclass="TableVisualizer" testclass="ResultCollector" testname="Table Visualizer" enabled="true">
            <boolProp name="ResultCollector.error_logging">false
            <objProp>
              <name>saveConfig
              <value class="SampleSaveConfiguration">
                <time>true
                <latency>true
                <timestamp>true
                <success>true
                <label>true
                <code>true
                <message>true
                <threadName>false
                <dataType>true
                <encoding>true
                <assertions>false
                <subresults>false
                <responseData>false
                <samplerData>false
                <xml>true
                <fieldNames>true
                <responseHeaders>false
                <requestHeaders>false
                <responseDataOnError>false
                <saveAssertionResultsFailureMessage>false
                <assertionsResultsToSave>0
              </value>
            </objProp>
            <stringProp name="filename">
          </ResultCollector>
          <hashTree/>
          <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Full Visualizer" enabled="true">
            <boolProp name="ResultCollector.error_logging">false
            <objProp>
              <name>saveConfig
              <value class="SampleSaveConfiguration">
                <time>true
                <latency>true
                <timestamp>true
                <success>true
                <label>true
                <code>true
                <message>true
                <threadName>false
                <dataType>true
                <encoding>true
                <assertions>false
                <subresults>false
                <responseData>false
                <samplerData>false
                <xml>true
                <fieldNames>true
                <responseHeaders>false
                <requestHeaders>false
                <responseDataOnError>false
                <saveAssertionResultsFailureMessage>false
                <assertionsResultsToSave>0
              </value>
            </objProp>
            <stringProp name="filename">
          </ResultCollector>
          <hashTree/>
        </hashTree>
      </hashTree>
      <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Core" enabled="true">
        <longProp name="ThreadGroup.start_time">0
        <stringProp name="ThreadGroup.delay">
        <stringProp name="ThreadGroup.duration">
        <stringProp name="ThreadGroup.num_threads">1
        <boolProp name="ThreadGroup.scheduler">false
        <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
          <boolProp name="LoopController.continue_forever">false
          <intProp name="LoopController.loops">-1
        </elementProp>
        <longProp name="ThreadGroup.end_time">0
        <stringProp name="ThreadGroup.on_sample_error">continue
        <stringProp name="ThreadGroup.ramp_time">1
      </ThreadGroup>
      <hashTree>
        <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="Config" enabled="true"/>
        <hashTree>
          <ConfigTestElement guiclass="LoginConfigGui" testclass="ConfigTestElement" testname="Login Config Element" enabled="true">
            <stringProp name="ConfigTestElement.username">
            <stringProp name="ConfigTestElement.password">
          </ConfigTestElement>
          <hashTree/>
          <ConfigTestElement guiclass="SimpleConfigGui" testclass="ConfigTestElement" testname="Simple Config Element" enabled="true"/>
          <hashTree/>
          <CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="CSV Data Set Config" enabled="true">
            <stringProp name="variableNames">
            <stringProp name="filename">
          </CSVDataSet>
          <hashTree/>
        </hashTree>
        <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="Control" enabled="true"/>
        <hashTree>
          <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="Simple Controller" enabled="true"/>
          <hashTree/>
          <LoopController guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
            <boolProp name="LoopController.continue_forever">true
            <stringProp name="LoopController.loops">1
          </LoopController>
          <hashTree/>
        </hashTree>
      </hashTree>
      <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Protocol: FTP" enabled="true">
        <longProp name="ThreadGroup.start_time">0
        <stringProp name="ThreadGroup.delay">
        <stringProp name="ThreadGroup.duration">
        <stringProp name="ThreadGroup.num_threads">1
        <boolProp name="ThreadGroup.scheduler">false
        <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
          <boolProp name="LoopController.continue_forever">false
          <intProp name="LoopController.loops">-1
        </elementProp>
        <longProp name="ThreadGroup.end_time">0
        <stringProp name="ThreadGroup.on_sample_error">continue
        <stringProp name="ThreadGroup.ramp_time">1
      </ThreadGroup>
      <hashTree>
        <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="Config" enabled="true"/>
        <hashTree>
          <ConfigTestElement guiclass="FtpConfigGui" testclass="ConfigTestElement" testname="FTP Config" enabled="true">
            <stringProp name="FTPSampler.server">
            <stringProp name="FTPSampler.filename">
          </ConfigTestElement>
          <hashTree/>
        </hashTree>
        <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="Control" enabled="true"/>
        <hashTree>
          <FTPSampler guiclass="FtpTestSamplerGui" testclass="FTPSampler" testname="FTP Test Sampler" enabled="true">
            <stringProp name="FTPSampler.server">
            <stringProp name="FTPSampler.filename">
            <stringProp name="ConfigTestElement.username">
            <stringProp name="ConfigTestElement.password">
          </FTPSampler>
          <hashTree/>
        </hashTree>
      </hashTree>
      <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Protocol: HTTP" enabled="true">
        <longProp name="ThreadGroup.start_time">0
        <stringProp name="ThreadGroup.delay">
        <stringProp name="ThreadGroup.duration">
        <stringProp name="ThreadGroup.num_threads">1
        <boolProp name="ThreadGroup.scheduler">false
        <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
          <boolProp name="LoopController.continue_forever">false
          <intProp name="LoopController.loops">-1
        </elementProp>
        <longProp name="ThreadGroup.end_time">0
        <stringProp name="ThreadGroup.on_sample_error">continue
        <stringProp name="ThreadGroup.ramp_time">1
      </ThreadGroup>
      <hashTree>
        <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="Config" enabled="true"/>
        <hashTree>
          <ConfigTestElement guiclass="HttpDefaultsGui" testclass="ConfigTestElement" testname="HTTP Request Defaults" enabled="true">
            <stringProp name="HTTPSampler.path">
            <stringProp name="HTTPSampler.domain">
            <stringProp name="HTTPSampler.protocol">
            <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="Argument List" enabled="true">
              <collectionProp name="Arguments.arguments"/>
            </elementProp>
            <stringProp name="HTTPSampler.port">
          </ConfigTestElement>
          <hashTree/>
        </hashTree>
        <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="Control" enabled="true"/>
        <hashTree>
          <RecordingController guiclass="RecordController" testclass="RecordingController" testname="Recording Controller" enabled="true"/>
          <hashTree/>
        </hashTree>
        <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="GUI" enabled="true"/>
        <hashTree>
          <AuthManager guiclass="AuthPanel" testclass="AuthManager" testname="AuthPanel" enabled="true">
            <collectionProp name="AuthManager.auth_list"/>
          </AuthManager>
          <hashTree/>
          <CookieManager guiclass="CookiePanel" testclass="CookieManager" testname="Cookie Panel" enabled="true">
            <collectionProp name="CookieManager.cookies"/>
            <boolProp name="CookieManager.clearEachIteration">false
          </CookieManager>
          <hashTree/>
          <HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="Header Panel" enabled="true">
            <collectionProp name="HeaderManager.headers"/>
          </HeaderManager>
          <hashTree/>
        </hashTree>
        <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="Pre Processors" enabled="true"/>
        <hashTree>
          <AnchorModifier guiclass="AnchorModifierGui" testclass="AnchorModifier" testname="Anchor Modifier" enabled="true"/>
          <hashTree/>
          <ParamModifier guiclass="ParamModifierGui" testclass="ParamModifier" testname="Param Modifier" enabled="true">
            <elementProp name="ParamModifier.mask" elementType="ParamMask">
              <stringProp name="ParamModifier.field_name">
              <stringProp name="ParamModifier.prefix">
              <longProp name="ParamModifier.lower_bound">0
              <longProp name="ParamModifier.upper_bound">10
              <longProp name="ParamModifier.increment">1
              <stringProp name="ParamModifier.suffix">
            </elementProp>
          </ParamModifier>
          <hashTree/>
          <URLRewritingModifier guiclass="URLRewritingModifierGui" testclass="URLRewritingModifier" testname="URL Rewriting Modifier" enabled="true">
            <boolProp name="path_extension">false
            <boolProp name="path_extension_no_questionmark">false
            <stringProp name="argument_name">
            <boolProp name="path_extension_no_equals">false
          </URLRewritingModifier>
          <hashTree/>
          <UserParameterModifier guiclass="UserParameterModifierGui" testclass="UserParameterModifier" testname="User Parameter Modifier" enabled="true">
            <stringProp name="UserParameterModifier.xmluri">users.xml
          </UserParameterModifier>
          <hashTree/>
        </hashTree>
        <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="Samplers" enabled="true"/>
        <hashTree>
          <HTTPSampler guiclass="HttpTestSampleGui" testclass="HTTPSampler" testname="HTTP Test Sampler" enabled="true">
            <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="Argument List" enabled="true">
              <collectionProp name="Arguments.arguments"/>
            </elementProp>
            <stringProp name="HTTPSampler.path">
            <stringProp name="HTTPSampler.method">POST
            <boolProp name="HTTPSampler.use_keepalive">true
            <stringProp name="HTTPSampler.protocol">
            <boolProp name="HTTPSampler.image_parser">false
            <boolProp name="HTTPSampler.follow_redirects">true
            <stringProp name="HTTPSampler.port">
            <stringProp name="HTTPSampler.monitor">false
            <stringProp name="HTTPSampler.domain">
            <boolProp name="HTTPSampler.auto_redirects">false
          </HTTPSampler>
          <hashTree/>
          <SoapSampler guiclass="SoapSamplerGui" testclass="SoapSampler" testname="SOAP Sampler" enabled="true">
            <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
              <collectionProp name="Arguments.arguments"/>
            </elementProp>
            <stringProp name="HTTPSampler.path">/
            <stringProp name="HTTPSampler.encoded_path">/
            <stringProp name="HTTPSampler.method">POST
            <stringProp name="HTTPSampler.protocol">http
            <intProp name="HTTPSampler.port">-1
            <stringProp name="HTTPSampler.domain">
            <stringProp name="HTTPSamper.xml_data">
            <stringProp name="SoapSampler.URL_DATA">
          </SoapSampler>
          <hashTree/>
          <WebServiceSampler guiclass="WebServiceSamplerGui" testclass="WebServiceSampler" testname="WebService (SOAP) Request" enabled="true">
            <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
              <collectionProp name="Arguments.arguments"/>
            </elementProp>
            <stringProp name="HTTPSampler.path">/
            <stringProp name="HTTPSampler.encoded_path">/
            <stringProp name="HTTPSampler.method">POST
            <stringProp name="WebServiceSampler.proxy_host">
            <stringProp name="HTTPSampler.protocol">http
            <stringProp name="WebServiceSampler.proxy_port">
            <intProp name="HTTPSampler.port">80
            <stringProp name="WebServiceSampler.use_proxy">false
            <stringProp name="Soap.Action">
            <stringProp name="WebServiceSampler.xml_data_file">
            <stringProp name="WebServiceSampler.read_response">false
            <stringProp name="WebServiceSampler.xml_path_loc">
            <stringProp name="WebserviceSampler.wsdl_url">
            <stringProp name="WebServiceSampler.memory_cache">false
            <stringProp name="HTTPSampler.domain">
            <stringProp name="HTTPSamper.xml_data">
          </WebServiceSampler>
          <hashTree/>
          <AccessLogSampler guiclass="TestBeanGUI" testclass="AccessLogSampler" testname="Tomcat Access Log Sampler" enabled="true">
            <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
              <collectionProp name="Arguments.arguments"/>
            </elementProp>
            <stringProp name="AccessLogSampler.parser_class_name">org.apache.jmeter.protocol.http.util.accesslog.TCLogParser
            <boolProp name="HTTPSampler.image_parser">false
            <intProp name="HTTPSampler.port">80
            <stringProp name="parserClassName">org.apache.jmeter.protocol.http.util.accesslog.TCLogParser
            <stringProp name="portString">
            <stringProp name="logFile">
            <stringProp name="HTTPSampler.domain">
            <stringProp name="domain">
            <stringProp name="AccessLogSampler.generator_class_name">org.apache.jmeter.protocol.http.util.accesslog.StandardGenerator
            <boolProp name="imageParsing">false
            <stringProp name="AccessLogSampler.log_file">
          </AccessLogSampler>
          <hashTree/>
        </hashTree>
      </hashTree>
      <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Protocol: Java" enabled="true">
        <longProp name="ThreadGroup.start_time">0
        <stringProp name="ThreadGroup.delay">
        <stringProp name="ThreadGroup.duration">
        <stringProp name="ThreadGroup.num_threads">1
        <boolProp name="ThreadGroup.scheduler">false
        <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
          <boolProp name="LoopController.continue_forever">false
          <intProp name="LoopController.loops">-1
        </elementProp>
        <longProp name="ThreadGroup.end_time">0
        <stringProp name="ThreadGroup.on_sample_error">continue
        <stringProp name="ThreadGroup.ramp_time">1
      </ThreadGroup>
      <hashTree>
        <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="Config" enabled="true"/>
        <hashTree>
          <JavaConfig guiclass="JavaConfigGui" testclass="JavaConfig" testname="Java Config" enabled="true">
            <elementProp name="arguments" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" enabled="true">
              <collectionProp name="Arguments.arguments">
                <elementProp name="SleepTime" elementType="Argument">
                  <stringProp name="Argument.metadata">=
                  <stringProp name="Argument.value">1000
                  <stringProp name="Argument.name">SleepTime
                </elementProp>
                <elementProp name="SleepMask" elementType="Argument">
                  <stringProp name="Argument.metadata">=
                  <stringProp name="Argument.value">0x3FF
                  <stringProp name="Argument.name">SleepMask
                </elementProp>
              </collectionProp>
            </elementProp>
            <stringProp name="classname">org.apache.jmeter.protocol.java.test.SleepTest
          </JavaConfig>
          <hashTree/>
        </hashTree>
        <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="Control" enabled="true"/>
        <hashTree>
          <JavaSampler guiclass="JavaTestSamplerGui" testclass="JavaSampler" testname="Java SleepTest" enabled="true">
            <elementProp name="arguments" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" enabled="true">
              <collectionProp name="Arguments.arguments">
                <elementProp name="SleepTime" elementType="Argument">
                  <stringProp name="Argument.metadata">=
                  <stringProp name="Argument.value">1000
                  <stringProp name="Argument.name">SleepTime
                </elementProp>
                <elementProp name="SleepMask" elementType="Argument">
                  <stringProp name="Argument.metadata">=
                  <stringProp name="Argument.value">0x3FF
                  <stringProp name="Argument.name">SleepMask
                </elementProp>
              </collectionProp>
            </elementProp>
            <stringProp name="classname">org.apache.jmeter.protocol.java.test.SleepTest
          </JavaSampler>
          <hashTree/>
          <JavaSampler guiclass="JavaTestSamplerGui" testclass="JavaSampler" testname="JavaTest" enabled="true">
            <elementProp name="arguments" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" enabled="true">
              <collectionProp name="Arguments.arguments">
                <elementProp name="Sleep_Time" elementType="Argument">
                  <stringProp name="Argument.metadata">=
                  <stringProp name="Argument.value">100
                  <stringProp name="Argument.name">Sleep_Time
                </elementProp>
                <elementProp name="Sleep_Mask" elementType="Argument">
                  <stringProp name="Argument.metadata">=
                  <stringProp name="Argument.value">0xFF
                  <stringProp name="Argument.name">Sleep_Mask
                </elementProp>
                <elementProp name="Label" elementType="Argument">
                  <stringProp name="Argument.metadata">=
                  <stringProp name="Argument.value">JavaTest
                  <stringProp name="Argument.name">Label
                </elementProp>
                <elementProp name="ResponseCode" elementType="Argument">
                  <stringProp name="Argument.metadata">=
                  <stringProp name="Argument.value">200 (or any other number)
                  <stringProp name="Argument.name">ResponseCode
                </elementProp>
                <elementProp name="ResponseMessage" elementType="Argument">
                  <stringProp name="Argument.metadata">=
                  <stringProp name="Argument.value">OK (or any other text)
                  <stringProp name="Argument.name">ResponseMessage
                </elementProp>
                <elementProp name="Status" elementType="Argument">
                  <stringProp name="Argument.metadata">=
                  <stringProp name="Argument.value">OK
                  <stringProp name="Argument.name">Status
                </elementProp>
                <elementProp name="SamplerData" elementType="Argument">
                  <stringProp name="Argument.metadata">=
                  <stringProp name="Argument.value">SamplerData goes here
                  <stringProp name="Argument.name">SamplerData
                </elementProp>
                <elementProp name="ResultData" elementType="Argument">
                  <stringProp name="Argument.metadata">=
                  <stringProp name="Argument.value">ResultData goes here
                  <stringProp name="Argument.name">ResultData
                </elementProp>
              </collectionProp>
            </elementProp>
            <stringProp name="classname">org.apache.jmeter.protocol.java.test.JavaTest
          </JavaSampler>
          <hashTree/>
          <BeanShellSampler guiclass="BeanShellSamplerGui" testclass="BeanShellSampler" testname="BeanShell Sampler" enabled="true">
            <stringProp name="BeanShellSampler.filename">
            <stringProp name="BeanShellSampler.query">ResponseCode=12;
ResponseMessage="Buckle my shoe";
IsSuccess=false;
Label="Sticky";
// FileName is the Script file name
// bsh.args[1] == "quick"
return "This will go into the Response Data field";</stringProp>
            <stringProp name="BeanShellSampler.parameters">the quick brown fox
          </BeanShellSampler>
          <hashTree/>
        </hashTree>
      </hashTree>
      <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Protocol: JDBC" enabled="true">
        <longProp name="ThreadGroup.start_time">0
        <stringProp name="ThreadGroup.delay">
        <stringProp name="ThreadGroup.duration">
        <stringProp name="ThreadGroup.num_threads">1
        <boolProp name="ThreadGroup.scheduler">false
        <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
          <boolProp name="LoopController.continue_forever">false
          <intProp name="LoopController.loops">-1
        </elementProp>
        <longProp name="ThreadGroup.end_time">0
        <stringProp name="ThreadGroup.on_sample_error">continue
        <stringProp name="ThreadGroup.ramp_time">1
      </ThreadGroup>
      <hashTree>
        <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="Config" enabled="true"/>
        <hashTree>
          <JDBCDataSource guiclass="TestBeanGUI" testclass="JDBCDataSource" testname="JDBC Connection Configuration" enabled="true">
            <stringProp name="password">
            <stringProp name="checkQuery">Select 1
            <stringProp name="timeout">10000
            <stringProp name="trimInterval">60000
            <boolProp name="autocommit">true
            <stringProp name="poolMax">10
            <stringProp name="driver">
            <stringProp name="connectionAge">5000
            <stringProp name="dataSource">
            <stringProp name="username">
            <boolProp name="keepAlive">true
            <stringProp name="dbUrl">
          </JDBCDataSource>
          <hashTree/>
        </hashTree>
        <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="Control" enabled="true"/>
        <hashTree>
          <JDBCSampler guiclass="TestBeanGUI" testclass="JDBCSampler" testname="JDBC Test Sample" enabled="true">
            <stringProp name="JDBCSampler.url">
            <stringProp name="JDBCSampler.connections">1
            <stringProp name="ConfigTestElement.username">
            <stringProp name="JDBCSampler.maxuse">50
            <stringProp name="dataSource">
            <stringProp name="query">
            <stringProp name="JDBCSampler.driver">
            <stringProp name="JDBCSampler.connPoolClass">org.apache.jmeter.protocol.jdbc.util.JMeter19ConnectionPool
            <stringProp name="ConfigTestElement.password">
          </JDBCSampler>
          <hashTree/>
        </hashTree>
      </hashTree>
      <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="LDAP" enabled="true">
        <longProp name="ThreadGroup.start_time">0
        <stringProp name="ThreadGroup.delay">
        <stringProp name="ThreadGroup.duration">
        <stringProp name="ThreadGroup.num_threads">1
        <boolProp name="ThreadGroup.scheduler">false
        <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
          <boolProp name="LoopController.continue_forever">false
          <intProp name="LoopController.loops">-1
        </elementProp>
        <longProp name="ThreadGroup.end_time">0
        <stringProp name="ThreadGroup.on_sample_error">continue
        <stringProp name="ThreadGroup.ramp_time">1
      </ThreadGroup>
      <hashTree>
        <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="Config" enabled="true"/>
        <hashTree>
          <ConfigTestElement guiclass="LdapConfigGui" testclass="ConfigTestElement" testname="LDAP Request Defaults" enabled="true">
            <stringProp name="rootdn">
            <stringProp name="servername">
            <stringProp name="port">
            <boolProp name="user_defined">false
          </ConfigTestElement>
          <hashTree/>
        </hashTree>
        <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="Samplers" enabled="true"/>
        <hashTree>
          <LDAPSampler guiclass="LdapTestSamplerGui" testclass="LDAPSampler" testname="LDAP Request" enabled="true">
            <stringProp name="rootdn">
            <stringProp name="servername">
            <stringProp name="ConfigTestElement.username">
            <stringProp name="port">
            <stringProp name="ConfigTestElement.password">
            <boolProp name="user_defined">false
          </LDAPSampler>
          <hashTree/>
        </hashTree>
      </hashTree>
    </hashTree>
  </hashTree>
</jmeterTestPlan>

Other JMeter examples (source code examples)

Here is a short list of links related to this JMeter GuiTest.jmx source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.