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

Jetty example source code file (jetty-chat.jmx)

This example Jetty source code file (jetty-chat.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 - Jetty tags/keywords

arguments, arguments, defined, http, httpargument, httpargument, httpargumentspanel, httpsampler, httpsampler, httptestsamplegui, loopcontroller, user, user, variables

The Jetty jetty-chat.jmx source code

<jmeterTestPlan version="1.2" properties="1.8">
  <hashTree>
    <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true">
      <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">
      <boolProp name="TestPlan.serialize_threadgroups">false
      <boolProp name="TestPlan.functional_mode">false
      <stringProp name="TestPlan.comments">
    </TestPlan>
    <hashTree>
      <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Thread Group" enabled="true">
        <longProp name="ThreadGroup.start_time">1165945030000
        <stringProp name="ThreadGroup.delay">
        <stringProp name="ThreadGroup.duration">
        <stringProp name="ThreadGroup.num_threads">400
        <boolProp name="ThreadGroup.scheduler">false
        <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
          <stringProp name="LoopController.loops">1
          <boolProp name="LoopController.continue_forever">false
        </elementProp>
        <longProp name="ThreadGroup.end_time">1165945030000
        <stringProp name="ThreadGroup.on_sample_error">continue
        <stringProp name="ThreadGroup.ramp_time">10
      </ThreadGroup>
      <hashTree>
        <Arguments guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
          <collectionProp name="Arguments.arguments">
            <elementProp name="rooms" elementType="Argument">
              <stringProp name="Argument.metadata">=
              <stringProp name="Argument.value">50
              <stringProp name="Argument.name">rooms
            </elementProp>
            <elementProp name="" elementType="Argument">
              <stringProp name="Argument.metadata">=
              <stringProp name="Argument.value">
              <stringProp name="Argument.name">
            </elementProp>
          </collectionProp>
        </Arguments>
        <hashTree/>
        <ConfigTestElement guiclass="HttpDefaultsGui" testclass="ConfigTestElement" testname="HTTP Request Defaults" enabled="true">
          <stringProp name="HTTPSampler.path">/test/chat/
          <stringProp name="HTTPSampler.domain">localhost
          <stringProp name="HTTPSampler.protocol">http
          <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
            <collectionProp name="Arguments.arguments"/>
          </elementProp>
          <stringProp name="HTTPSampler.port">8080
        </ConfigTestElement>
        <hashTree/>
        <CookieManager guiclass="CookiePanel" testclass="CookieManager" testname="HTTP Cookie Manager" enabled="true">
          <boolProp name="CookieManager.clearEachIteration">true
          <collectionProp name="CookieManager.cookies"/>
        </CookieManager>
        <hashTree/>
        <HTTPSampler guiclass="HttpTestSampleGui" testclass="HTTPSampler" testname="HTTP Poll 0" enabled="true">
          <stringProp name="HTTPSampler.path">
          <stringProp name="HTTPSampler.method">GET
          <boolProp name="HTTPSampler.use_keepalive">true
          <stringProp name="HTTPSampler.protocol">
          <boolProp name="HTTPSampler.follow_redirects">true
          <stringProp name="HTTPSampler.port">
          <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
            <collectionProp name="Arguments.arguments">
              <elementProp name="" elementType="HTTPArgument">
                <stringProp name="Argument.metadata">=
                <stringProp name="Argument.value">poll
                <boolProp name="HTTPArgument.use_equals">true
                <stringProp name="Argument.name">ajax
                <boolProp name="HTTPArgument.always_encode">false
              </elementProp>
              <elementProp name="" elementType="HTTPArgument">
                <stringProp name="Argument.metadata">=
                <stringProp name="Argument.value">poll
                <boolProp name="HTTPArgument.use_equals">true
                <stringProp name="Argument.name">message
                <boolProp name="HTTPArgument.always_encode">false
              </elementProp>
              <elementProp name="" elementType="HTTPArgument">
                <stringProp name="Argument.metadata">=
                <stringProp name="Argument.value">0
                <boolProp name="HTTPArgument.use_equals">true
                <stringProp name="Argument.name">timeout
                <boolProp name="HTTPArgument.always_encode">false
              </elementProp>
              <elementProp name="" elementType="HTTPArgument">
                <stringProp name="Argument.metadata">=
                <stringProp name="Argument.value">${__javaScript(${__threadNum}%${rooms},room)}
                <boolProp name="HTTPArgument.use_equals">true
                <stringProp name="Argument.name">room
                <boolProp name="HTTPArgument.always_encode">false
              </elementProp>
            </collectionProp>
          </elementProp>
          <stringProp name="HTTPSampler.mimetype">
          <stringProp name="HTTPSampler.FILE_FIELD">
          <stringProp name="HTTPSampler.monitor">false
          <stringProp name="HTTPSampler.domain">
          <stringProp name="HTTPSampler.FILE_NAME">
          <boolProp name="HTTPSampler.auto_redirects">false
        </HTTPSampler>
        <hashTree/>
        <HTTPSampler guiclass="HttpTestSampleGui" testclass="HTTPSampler" testname="HTTP Join" enabled="true">
          <stringProp name="HTTPSampler.path">
          <stringProp name="HTTPSampler.method">POST
          <boolProp name="HTTPSampler.use_keepalive">true
          <stringProp name="HTTPSampler.protocol">
          <boolProp name="HTTPSampler.follow_redirects">false
          <stringProp name="HTTPSampler.port">
          <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
            <collectionProp name="Arguments.arguments">
              <elementProp name="" elementType="HTTPArgument">
                <stringProp name="Argument.metadata">=
                <stringProp name="Argument.value">join
                <boolProp name="HTTPArgument.use_equals">true
                <stringProp name="Argument.name">ajax
                <boolProp name="HTTPArgument.always_encode">false
              </elementProp>
              <elementProp name="" elementType="HTTPArgument">
                <stringProp name="Argument.metadata">=
                <stringProp name="Argument.value">Elvis${__threadNum}
                <boolProp name="HTTPArgument.use_equals">true
                <stringProp name="Argument.name">message
                <boolProp name="HTTPArgument.always_encode">false
              </elementProp>
              <elementProp name="" elementType="HTTPArgument">
                <stringProp name="Argument.metadata">=
                <stringProp name="Argument.value">${__javaScript(${__threadNum}%${rooms},room)}
                <boolProp name="HTTPArgument.use_equals">true
                <stringProp name="Argument.name">room
                <boolProp name="HTTPArgument.always_encode">false
              </elementProp>
            </collectionProp>
          </elementProp>
          <stringProp name="HTTPSampler.mimetype">
          <stringProp name="HTTPSampler.FILE_FIELD">
          <stringProp name="HTTPSampler.monitor">false
          <stringProp name="HTTPSampler.domain">
          <stringProp name="HTTPSampler.FILE_NAME">
          <boolProp name="HTTPSampler.auto_redirects">false
        </HTTPSampler>
        <hashTree/>
        <LoopController guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
          <intProp name="LoopController.loops">-1
          <boolProp name="LoopController.continue_forever">true
        </LoopController>
        <hashTree>
          <LoopController guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
            <stringProp name="LoopController.loops">${__Random(3,20,random)}
            <boolProp name="LoopController.continue_forever">true
          </LoopController>
          <hashTree>
            <HTTPSampler guiclass="HttpTestSampleGui" testclass="HTTPSampler" testname="HTTP Poll n" enabled="true">
              <stringProp name="HTTPSampler.path">
              <stringProp name="HTTPSampler.method">GET
              <boolProp name="HTTPSampler.use_keepalive">true
              <stringProp name="HTTPSampler.protocol">
              <boolProp name="HTTPSampler.follow_redirects">true
              <stringProp name="HTTPSampler.port">
              <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
                <collectionProp name="Arguments.arguments">
                  <elementProp name="" elementType="HTTPArgument">
                    <stringProp name="Argument.metadata">=
                    <stringProp name="Argument.value">poll
                    <boolProp name="HTTPArgument.use_equals">true
                    <stringProp name="Argument.name">ajax
                    <boolProp name="HTTPArgument.always_encode">false
                  </elementProp>
                  <elementProp name="" elementType="HTTPArgument">
                    <stringProp name="Argument.metadata">=
                    <stringProp name="Argument.value">poll
                    <boolProp name="HTTPArgument.use_equals">true
                    <stringProp name="Argument.name">message
                    <boolProp name="HTTPArgument.always_encode">false
                  </elementProp>
                  <elementProp name="" elementType="HTTPArgument">
                    <stringProp name="Argument.metadata">=
                    <stringProp name="Argument.value">${__Random(3000,10000,poll)}
                    <boolProp name="HTTPArgument.use_equals">true
                    <stringProp name="Argument.name">timeout
                    <boolProp name="HTTPArgument.always_encode">false
                  </elementProp>
                  <elementProp name="" elementType="HTTPArgument">
                    <stringProp name="Argument.metadata">=
                    <stringProp name="Argument.value">${__javaScript(${__threadNum}%${rooms},room)}
                    <boolProp name="HTTPArgument.use_equals">true
                    <stringProp name="Argument.name">room
                    <boolProp name="HTTPArgument.always_encode">false
                  </elementProp>
                </collectionProp>
              </elementProp>
              <stringProp name="HTTPSampler.mimetype">
              <stringProp name="HTTPSampler.FILE_FIELD">
              <stringProp name="HTTPSampler.monitor">false
              <stringProp name="HTTPSampler.domain">
              <stringProp name="HTTPSampler.FILE_NAME">
              <boolProp name="HTTPSampler.auto_redirects">false
            </HTTPSampler>
            <hashTree/>
          </hashTree>
          <HTTPSampler guiclass="HttpTestSampleGui" testclass="HTTPSampler" testname="HTTP chat" enabled="true">
            <stringProp name="HTTPSampler.path">
            <stringProp name="HTTPSampler.method">POST
            <boolProp name="HTTPSampler.use_keepalive">true
            <stringProp name="HTTPSampler.protocol">
            <boolProp name="HTTPSampler.follow_redirects">false
            <stringProp name="HTTPSampler.port">
            <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
              <collectionProp name="Arguments.arguments">
                <elementProp name="" elementType="HTTPArgument">
                  <stringProp name="Argument.metadata">=
                  <stringProp name="Argument.value">chat
                  <boolProp name="HTTPArgument.use_equals">true
                  <stringProp name="Argument.name">ajax
                  <boolProp name="HTTPArgument.always_encode">false
                </elementProp>
                <elementProp name="" elementType="HTTPArgument">
                  <stringProp name="Argument.metadata">=
                  <stringProp name="Argument.value">Give me ${__Random(1,200,mars)} deep fried mars bars
                  <boolProp name="HTTPArgument.use_equals">true
                  <stringProp name="Argument.name">message
                  <boolProp name="HTTPArgument.always_encode">false
                </elementProp>
                <elementProp name="" elementType="HTTPArgument">
                  <stringProp name="Argument.metadata">=
                  <stringProp name="Argument.value">${__javaScript(${__threadNum}%${rooms},room)}
                  <boolProp name="HTTPArgument.use_equals">true
                  <stringProp name="Argument.name">room
                  <boolProp name="HTTPArgument.always_encode">false
                </elementProp>
              </collectionProp>
            </elementProp>
            <stringProp name="HTTPSampler.mimetype">
            <stringProp name="HTTPSampler.FILE_FIELD">
            <stringProp name="HTTPSampler.monitor">false
            <stringProp name="HTTPSampler.domain">
            <stringProp name="HTTPSampler.FILE_NAME">
            <boolProp name="HTTPSampler.auto_redirects">false
          </HTTPSampler>
          <hashTree/>
        </hashTree>
        <HTTPSampler guiclass="HttpTestSampleGui" testclass="HTTPSampler" testname="HTTP Leave" enabled="true">
          <stringProp name="HTTPSampler.path">
          <stringProp name="HTTPSampler.method">POST
          <boolProp name="HTTPSampler.use_keepalive">true
          <stringProp name="HTTPSampler.protocol">
          <boolProp name="HTTPSampler.follow_redirects">false
          <stringProp name="HTTPSampler.port">
          <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
            <collectionProp name="Arguments.arguments">
              <elementProp name="" elementType="HTTPArgument">
                <stringProp name="Argument.metadata">=
                <stringProp name="Argument.value">leave
                <boolProp name="HTTPArgument.use_equals">true
                <stringProp name="Argument.name">ajax
                <boolProp name="HTTPArgument.always_encode">false
              </elementProp>
              <elementProp name="" elementType="HTTPArgument">
                <stringProp name="Argument.metadata">=
                <stringProp name="Argument.value">Elvis${__threadNum}
                <boolProp name="HTTPArgument.use_equals">true
                <stringProp name="Argument.name">message
                <boolProp name="HTTPArgument.always_encode">false
              </elementProp>
              <elementProp name="" elementType="HTTPArgument">
                <stringProp name="Argument.metadata">=
                <stringProp name="Argument.value">${__javaScript(${__threadNum}%${rooms},room)}
                <boolProp name="HTTPArgument.use_equals">true
                <stringProp name="Argument.name">room
                <boolProp name="HTTPArgument.always_encode">false
              </elementProp>
            </collectionProp>
          </elementProp>
          <stringProp name="HTTPSampler.mimetype">
          <stringProp name="HTTPSampler.FILE_FIELD">
          <stringProp name="HTTPSampler.monitor">false
          <stringProp name="HTTPSampler.domain">
          <stringProp name="HTTPSampler.FILE_NAME">
          <boolProp name="HTTPSampler.auto_redirects">false
        </HTTPSampler>
        <hashTree/>
      </hashTree>
      <ResultCollector guiclass="SummaryReport" testclass="ResultCollector" testname="Summary Report" enabled="true">
        <objProp>
          <value class="SampleSaveConfiguration">
            <time>true
            <latency>true
            <timestamp>true
            <success>true
            <label>true
            <code>true
            <message>true
            <threadName>true
            <dataType>true
            <encoding>false
            <assertions>true
            <subresults>true
            <responseData>false
            <samplerData>false
            <xml>false
            <fieldNames>false
            <responseHeaders>false
            <requestHeaders>false
            <responseDataOnError>false
            <saveAssertionResultsFailureMessage>false
            <assertionsResultsToSave>0
          </value>
          <name>saveConfig
        </objProp>
        <stringProp name="filename">
        <boolProp name="ResultCollector.error_logging">false
      </ResultCollector>
      <hashTree/>
    </hashTree>
  </hashTree>
</jmeterTestPlan>

Other Jetty examples (source code examples)

Here is a short list of links related to this Jetty jetty-chat.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.