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

JMeter example source code file (LoopTestPlan.jmx)

This example JMeter source code file (LoopTestPlan.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

arguments, arguments, configtestelement, get, httpargumentspanel, httpsampler, httpsampler, loopcontroller, loopcontroller, loopcontrolpanel, resultcollector, testplan, threadgroup, threadgroup

The JMeter LoopTestPlan.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>
      <boolProp name="TestPlan.serialize_threadgroups">false
      <boolProp name="TestPlan.functional_mode">false
      <stringProp name="TestPlan.comments">
    </TestPlan>
    <hashTree>
      <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Jakarta Users" 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
          <stringProp name="LoopController.loops">1
        </elementProp>
        <longProp name="ThreadGroup.end_time">0
        <stringProp name="ThreadGroup.on_sample_error">continue
        <stringProp name="ThreadGroup.ramp_time">0
      </ThreadGroup>
      <hashTree>
        <ConfigTestElement guiclass="HttpDefaultsGui" testclass="ConfigTestElement" testname="Defaults" enabled="true">
          <stringProp name="HTTPSampler.path">/
          <stringProp name="HTTPSampler.domain">jakarta.apache.org
          <stringProp name="HTTPSampler.protocol">
          <stringProp name="HTTPSampler.port">
          <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
            <collectionProp name="Arguments.arguments"/>
          </elementProp>
        </ConfigTestElement>
        <hashTree/>
        <HTTPSampler guiclass="HttpTestSampleGui" testclass="HTTPSampler" testname="Home Page" enabled="true">
          <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
            <collectionProp name="Arguments.arguments"/>
          </elementProp>
          <stringProp name="HTTPSampler.path">/
          <stringProp name="HTTPSampler.method">GET
          <boolProp name="HTTPSampler.use_keepalive">false
          <stringProp name="HTTPSampler.protocol">http
          <boolProp name="HTTPSampler.image_parser">false
          <boolProp name="HTTPSampler.follow_redirects">false
          <stringProp name="HTTPSampler.port">
          <stringProp name="HTTPSampler.monitor">false
          <stringProp name="HTTPSampler.domain">
          <boolProp name="HTTPSampler.auto_redirects">false
        </HTTPSampler>
        <hashTree/>
        <LoopController guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
          <stringProp name="LoopController.continue_forever">true
          <stringProp name="LoopController.loops">5
        </LoopController>
        <hashTree>
          <HTTPSampler guiclass="HttpTestSampleGui" testclass="HTTPSampler" testname="News Page" enabled="true">
            <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
              <collectionProp name="Arguments.arguments"/>
            </elementProp>
            <stringProp name="HTTPSampler.path">/site/news.html
            <stringProp name="HTTPSampler.method">GET
            <boolProp name="HTTPSampler.use_keepalive">false
            <stringProp name="HTTPSampler.protocol">http
            <boolProp name="HTTPSampler.image_parser">false
            <boolProp name="HTTPSampler.follow_redirects">false
            <stringProp name="HTTPSampler.port">
            <stringProp name="HTTPSampler.monitor">false
            <stringProp name="HTTPSampler.domain">
            <boolProp name="HTTPSampler.auto_redirects">false
          </HTTPSampler>
          <hashTree/>
        </hashTree>
        <ResultCollector guiclass="GraphVisualizer" testclass="ResultCollector" testname="File Reporter" 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">loop-test.dat
        </ResultCollector>
        <hashTree/>
      </hashTree>
    </hashTree>
  </hashTree>
</jmeterTestPlan>

Other JMeter examples (source code examples)

Here is a short list of links related to this JMeter LoopTestPlan.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.