You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Jason James <mr...@gmail.com> on 2009/11/17 12:36:25 UTC

Jmeter spidering : working example tutorial

Hi folks,

I am using Jmeter ver 2.3.4

I had been trying to get the Jmeter spidering working, the recipe in
the docs I found just did not work. I was finding that the documented
example

1. did not loop
2. would go back to th etop level http://www.mysite.org/.* and die
without re-spidering.

Here is my working testplan:

Thread Group [action to be taken after a sampler error = continue]
- HTTP Request [server name or IP = www.mysite.org]
- While Controller [Condition = LAST] You must type LAST
- - HTTP Request [server name www.mysite.org ; Path .*]
- - Link Parser

and that's it. The crucial things here were
.: the While Controller with the LAST option for the Condition
.: Also the documentation tells you to put server = .* in the first
HTTP Request : do that and you will spider the whole web!
.: setting action = continue in the Thread Group

Once all this was in place I found I could randomly trawl my clients
site with about 60,000 pages. I could ramp up the number of users to
simulate a load of people randomly hitting the site. Insertion of a
Timer Controller with a Gaussian distribution helps make it a bit more
random.

Happy spidering.

Jason

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: Jmeter spidering : working example tutorial

Posted by Deepak Shetty <sh...@gmail.com>.
FYI
http://theworkaholic.blogspot.com/2009/10/spidering-site-with-jmeter.html#solution

On Tue, Nov 17, 2009 at 3:36 AM, Jason James <mr...@gmail.com> wrote:

> Hi folks,
>
> I am using Jmeter ver 2.3.4
>
> I had been trying to get the Jmeter spidering working, the recipe in
> the docs I found just did not work. I was finding that the documented
> example
>
> 1. did not loop
> 2. would go back to th etop level http://www.mysite.org/.* and die
> without re-spidering.
>
> Here is my working testplan:
>
> Thread Group [action to be taken after a sampler error = continue]
> - HTTP Request [server name or IP = www.mysite.org]
> - While Controller [Condition = LAST] You must type LAST
> - - HTTP Request [server name www.mysite.org ; Path .*]
> - - Link Parser
>
> and that's it. The crucial things here were
> .: the While Controller with the LAST option for the Condition
> .: Also the documentation tells you to put server = .* in the first
> HTTP Request : do that and you will spider the whole web!
> .: setting action = continue in the Thread Group
>
> Once all this was in place I found I could randomly trawl my clients
> site with about 60,000 pages. I could ramp up the number of users to
> simulate a load of people randomly hitting the site. Insertion of a
> Timer Controller with a Gaussian distribution helps make it a bit more
> random.
>
> Happy spidering.
>
> Jason
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

Re: Jmeter spidering : working example tutorial

Posted by Deepak Shetty <sh...@gmail.com>.
CSV is not necessarily needed , the first request kicks off the spider.
A sample using HTML Link parser is
http://cid-1bd02fe33f80b8ac.skydrive.live.com/self.aspx/Public/jmeter/spider/Spider.jmx
Note that this technique stops when you hit an error (because the condition
LAST will exit).

regards
deepak

On Thu, Nov 19, 2009 at 3:03 PM, Carl Shaulis <cs...@homeaway.com> wrote:

> This e-mail makes spidering sound extremely easy.  I attempted to follow
> these steps but no success.  Here is the script for keen eyes.
>
> I am assuming that I do not need to start with a .csv file of URLs.
>
> Is that a bad assumption?
>
> Thanks,
>
> Carl
>
> <?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">
>      <stringProp name="TestPlan.comments"></stringProp>
>      <boolProp name="TestPlan.functional_mode">false</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>
>      <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup"
> testname="Sparky Spider" enabled="true">
>        <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">1</stringProp>
>        </elementProp>
>        <stringProp name="ThreadGroup.num_threads">1</stringProp>
>        <stringProp name="ThreadGroup.ramp_time">1</stringProp>
>        <longProp name="ThreadGroup.start_time">1258670311000</longProp>
>        <longProp name="ThreadGroup.end_time">1258670311000</longProp>
>        <boolProp name="ThreadGroup.scheduler">false</boolProp>
>        <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
>        <stringProp name="ThreadGroup.duration"></stringProp>
>        <stringProp name="ThreadGroup.delay"></stringProp>
>      </ThreadGroup>
>      <hashTree>
>        <ConfigTestElement guiclass="HttpDefaultsGui"
> testclass="ConfigTestElement" testname="HTTP Request Defaults"
> enabled="true">
>          <elementProp name="HTTPsampler.Arguments" elementType="Arguments"
> guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined
> Variables" enabled="true">
>            <collectionProp name="Arguments.arguments"/>
>          </elementProp>
>          <stringProp
> name="HTTPSampler.domain">http://10.28.123.55</stringProp>
>          <stringProp name="HTTPSampler.port">8081</stringProp>
>          <stringProp name="HTTPSampler.connect_timeout"></stringProp>
>          <stringProp name="HTTPSampler.response_timeout"></stringProp>
>          <stringProp name="HTTPSampler.protocol"></stringProp>
>          <stringProp name="HTTPSampler.contentEncoding"></stringProp>
>          <stringProp name="HTTPSampler.path"></stringProp>
>        </ConfigTestElement>
>        <hashTree/>
>        <WhileController guiclass="WhileControllerGui"
> testclass="WhileController" testname="While Controller" enabled="true">
>          <stringProp name="WhileController.condition">LAST</stringProp>
>        </WhileController>
>        <hashTree>
>          <ConfigTestElement guiclass="HttpDefaultsGui"
> testclass="ConfigTestElement" testname="HTTP Request Defaults"
> enabled="true">
>            <elementProp name="HTTPsampler.Arguments"
> elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments"
> testname="User Defined Variables" enabled="true">
>              <collectionProp name="Arguments.arguments"/>
>            </elementProp>
>            <stringProp name="HTTPSampler.domain">http://10.28.123.55 ;
> Path
> .*</stringProp>
>            <stringProp name="HTTPSampler.port">8081</stringProp>
>            <stringProp name="HTTPSampler.connect_timeout"></stringProp>
>            <stringProp name="HTTPSampler.response_timeout"></stringProp>
>            <stringProp name="HTTPSampler.protocol"></stringProp>
>            <stringProp name="HTTPSampler.contentEncoding"></stringProp>
>            <stringProp name="HTTPSampler.path"></stringProp>
>          </ConfigTestElement>
>          <hashTree/>
>          <AnchorModifier guiclass="AnchorModifierGui"
> testclass="AnchorModifier" testname="HTML Link Parser" enabled="true"/>
>          <hashTree/>
>        </hashTree>
>        <ResultCollector guiclass="ViewResultsFullVisualizer"
> testclass="ResultCollector" testname="View Results Tree" enabled="true">
>          <boolProp name="ResultCollector.error_logging">false</boolProp>
>          <objProp>
>            <name>saveConfig</name>
>            <value class="SampleSaveConfiguration">
>              <time>true</time>
>              <latency>true</latency>
>              <timestamp>true</timestamp>
>              <success>true</success>
>              <label>true</label>
>              <code>true</code>
>              <message>true</message>
>              <threadName>true</threadName>
>              <dataType>true</dataType>
>              <encoding>false</encoding>
>              <assertions>true</assertions>
>              <subresults>true</subresults>
>              <responseData>false</responseData>
>              <samplerData>false</samplerData>
>              <xml>true</xml>
>              <fieldNames>false</fieldNames>
>              <responseHeaders>false</responseHeaders>
>              <requestHeaders>false</requestHeaders>
>              <responseDataOnError>false</responseDataOnError>
>
>
> <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessag
> e>
>              <assertionsResultsToSave>0</assertionsResultsToSave>
>              <bytes>true</bytes>
>            </value>
>          </objProp>
>          <stringProp name="filename"></stringProp>
>        </ResultCollector>
>        <hashTree/>
>      </hashTree>
>    </hashTree>
>  </hashTree>
> </jmeterTestPlan>
>
>
>
> On 11/17/09 5:36 AM, "Jason James" <mr...@gmail.com> wrote:
>
> > Hi folks,
> >
> > I am using Jmeter ver 2.3.4
> >
> > I had been trying to get the Jmeter spidering working, the recipe in
> > the docs I found just did not work. I was finding that the documented
> > example
> >
> > 1. did not loop
> > 2. would go back to th etop level http://www.mysite.org/.* and die
> > without re-spidering.
> >
> > Here is my working testplan:
> >
> > Thread Group [action to be taken after a sampler error = continue]
> > - HTTP Request [server name or IP = www.mysite.org]
> > - While Controller [Condition = LAST] You must type LAST
> > - - HTTP Request [server name www.mysite.org ; Path .*]
> > - - Link Parser
> >
> > and that's it. The crucial things here were
> > .: the While Controller with the LAST option for the Condition
> > .: Also the documentation tells you to put server = .* in the first
> > HTTP Request : do that and you will spider the whole web!
> > .: setting action = continue in the Thread Group
> >
> > Once all this was in place I found I could randomly trawl my clients
> > site with about 60,000 pages. I could ramp up the number of users to
> > simulate a load of people randomly hitting the site. Insertion of a
> > Timer Controller with a Gaussian distribution helps make it a bit more
> > random.
> >
> > Happy spidering.
> >
> > Jason
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

Re: Jmeter spidering : working example tutorial

Posted by Deepak Shetty <sh...@gmail.com>.
hi
Ive tweaked this script to work around errors
Thread Group
+Initial request
+While Controller(true)
++HTTP Sampler (Path = .*)
+++HTML Link Parser
++If Controller (${__javaScript(!${JMeterThread.last_sample_ok})})
+++Initial request
+HTTPRequestDefaults (Server=whatever)

http://cid-1bd02fe33f80b8ac.skydrive.live.com/self.aspx/Public/jmeter/spider/Spider.jmx

regards
deepak

On Thu, Nov 19, 2009 at 3:34 PM, Deepak Shetty <sh...@gmail.com> wrote:

> you only seem to have HttprequestDefault elements, no samplers
> regards
> deepak
>
> On Thu, Nov 19, 2009 at 3:03 PM, Carl Shaulis <cs...@homeaway.com>wrote:
>
>> This e-mail makes spidering sound extremely easy.  I attempted to follow
>> these steps but no success.  Here is the script for keen eyes.
>>
>> I am assuming that I do not need to start with a .csv file of URLs.
>>
>> Is that a bad assumption?
>>
>> Thanks,
>>
>> Carl
>>
>> <?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">
>>      <stringProp name="TestPlan.comments"></stringProp>
>>      <boolProp name="TestPlan.functional_mode">false</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>
>>      <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup"
>> testname="Sparky Spider" enabled="true">
>>        <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">1</stringProp>
>>        </elementProp>
>>        <stringProp name="ThreadGroup.num_threads">1</stringProp>
>>        <stringProp name="ThreadGroup.ramp_time">1</stringProp>
>>        <longProp name="ThreadGroup.start_time">1258670311000</longProp>
>>        <longProp name="ThreadGroup.end_time">1258670311000</longProp>
>>        <boolProp name="ThreadGroup.scheduler">false</boolProp>
>>        <stringProp
>> name="ThreadGroup.on_sample_error">continue</stringProp>
>>        <stringProp name="ThreadGroup.duration"></stringProp>
>>        <stringProp name="ThreadGroup.delay"></stringProp>
>>      </ThreadGroup>
>>      <hashTree>
>>        <ConfigTestElement guiclass="HttpDefaultsGui"
>> testclass="ConfigTestElement" testname="HTTP Request Defaults"
>> enabled="true">
>>          <elementProp name="HTTPsampler.Arguments" elementType="Arguments"
>> guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined
>> Variables" enabled="true">
>>            <collectionProp name="Arguments.arguments"/>
>>          </elementProp>
>>          <stringProp
>> name="HTTPSampler.domain">http://10.28.123.55</stringProp>
>>          <stringProp name="HTTPSampler.port">8081</stringProp>
>>          <stringProp name="HTTPSampler.connect_timeout"></stringProp>
>>          <stringProp name="HTTPSampler.response_timeout"></stringProp>
>>          <stringProp name="HTTPSampler.protocol"></stringProp>
>>          <stringProp name="HTTPSampler.contentEncoding"></stringProp>
>>          <stringProp name="HTTPSampler.path"></stringProp>
>>        </ConfigTestElement>
>>        <hashTree/>
>>        <WhileController guiclass="WhileControllerGui"
>> testclass="WhileController" testname="While Controller" enabled="true">
>>          <stringProp name="WhileController.condition">LAST</stringProp>
>>        </WhileController>
>>        <hashTree>
>>          <ConfigTestElement guiclass="HttpDefaultsGui"
>> testclass="ConfigTestElement" testname="HTTP Request Defaults"
>> enabled="true">
>>            <elementProp name="HTTPsampler.Arguments"
>> elementType="Arguments" guiclass="HTTPArgumentsPanel"
>> testclass="Arguments"
>> testname="User Defined Variables" enabled="true">
>>              <collectionProp name="Arguments.arguments"/>
>>            </elementProp>
>>            <stringProp name="HTTPSampler.domain">http://10.28.123.55 ;
>> Path
>> .*</stringProp>
>>            <stringProp name="HTTPSampler.port">8081</stringProp>
>>            <stringProp name="HTTPSampler.connect_timeout"></stringProp>
>>            <stringProp name="HTTPSampler.response_timeout"></stringProp>
>>            <stringProp name="HTTPSampler.protocol"></stringProp>
>>            <stringProp name="HTTPSampler.contentEncoding"></stringProp>
>>            <stringProp name="HTTPSampler.path"></stringProp>
>>          </ConfigTestElement>
>>          <hashTree/>
>>          <AnchorModifier guiclass="AnchorModifierGui"
>> testclass="AnchorModifier" testname="HTML Link Parser" enabled="true"/>
>>          <hashTree/>
>>        </hashTree>
>>        <ResultCollector guiclass="ViewResultsFullVisualizer"
>> testclass="ResultCollector" testname="View Results Tree" enabled="true">
>>          <boolProp name="ResultCollector.error_logging">false</boolProp>
>>          <objProp>
>>            <name>saveConfig</name>
>>            <value class="SampleSaveConfiguration">
>>              <time>true</time>
>>              <latency>true</latency>
>>              <timestamp>true</timestamp>
>>              <success>true</success>
>>              <label>true</label>
>>              <code>true</code>
>>              <message>true</message>
>>              <threadName>true</threadName>
>>              <dataType>true</dataType>
>>              <encoding>false</encoding>
>>              <assertions>true</assertions>
>>              <subresults>true</subresults>
>>              <responseData>false</responseData>
>>              <samplerData>false</samplerData>
>>              <xml>true</xml>
>>              <fieldNames>false</fieldNames>
>>              <responseHeaders>false</responseHeaders>
>>              <requestHeaders>false</requestHeaders>
>>              <responseDataOnError>false</responseDataOnError>
>>
>>
>> <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessag
>> e>
>>              <assertionsResultsToSave>0</assertionsResultsToSave>
>>              <bytes>true</bytes>
>>            </value>
>>          </objProp>
>>          <stringProp name="filename"></stringProp>
>>        </ResultCollector>
>>        <hashTree/>
>>      </hashTree>
>>    </hashTree>
>>  </hashTree>
>> </jmeterTestPlan>
>>
>>
>>
>> On 11/17/09 5:36 AM, "Jason James" <mr...@gmail.com> wrote:
>>
>> > Hi folks,
>> >
>> > I am using Jmeter ver 2.3.4
>> >
>> > I had been trying to get the Jmeter spidering working, the recipe in
>> > the docs I found just did not work. I was finding that the documented
>> > example
>> >
>> > 1. did not loop
>> > 2. would go back to th etop level http://www.mysite.org/.* and die
>> > without re-spidering.
>> >
>> > Here is my working testplan:
>> >
>> > Thread Group [action to be taken after a sampler error = continue]
>> > - HTTP Request [server name or IP = www.mysite.org]
>> > - While Controller [Condition = LAST] You must type LAST
>> > - - HTTP Request [server name www.mysite.org ; Path .*]
>> > - - Link Parser
>> >
>> > and that's it. The crucial things here were
>> > .: the While Controller with the LAST option for the Condition
>> > .: Also the documentation tells you to put server = .* in the first
>> > HTTP Request : do that and you will spider the whole web!
>> > .: setting action = continue in the Thread Group
>> >
>> > Once all this was in place I found I could randomly trawl my clients
>> > site with about 60,000 pages. I could ramp up the number of users to
>> > simulate a load of people randomly hitting the site. Insertion of a
>> > Timer Controller with a Gaussian distribution helps make it a bit more
>> > random.
>> >
>> > Happy spidering.
>> >
>> > Jason
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>> > For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>> >
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>>
>>
>

Re: Jmeter spidering : working example tutorial

Posted by Deepak Shetty <sh...@gmail.com>.
you only seem to have HttprequestDefault elements, no samplers
regards
deepak

On Thu, Nov 19, 2009 at 3:03 PM, Carl Shaulis <cs...@homeaway.com> wrote:

> This e-mail makes spidering sound extremely easy.  I attempted to follow
> these steps but no success.  Here is the script for keen eyes.
>
> I am assuming that I do not need to start with a .csv file of URLs.
>
> Is that a bad assumption?
>
> Thanks,
>
> Carl
>
> <?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">
>      <stringProp name="TestPlan.comments"></stringProp>
>      <boolProp name="TestPlan.functional_mode">false</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>
>      <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup"
> testname="Sparky Spider" enabled="true">
>        <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">1</stringProp>
>        </elementProp>
>        <stringProp name="ThreadGroup.num_threads">1</stringProp>
>        <stringProp name="ThreadGroup.ramp_time">1</stringProp>
>        <longProp name="ThreadGroup.start_time">1258670311000</longProp>
>        <longProp name="ThreadGroup.end_time">1258670311000</longProp>
>        <boolProp name="ThreadGroup.scheduler">false</boolProp>
>        <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
>        <stringProp name="ThreadGroup.duration"></stringProp>
>        <stringProp name="ThreadGroup.delay"></stringProp>
>      </ThreadGroup>
>      <hashTree>
>        <ConfigTestElement guiclass="HttpDefaultsGui"
> testclass="ConfigTestElement" testname="HTTP Request Defaults"
> enabled="true">
>          <elementProp name="HTTPsampler.Arguments" elementType="Arguments"
> guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined
> Variables" enabled="true">
>            <collectionProp name="Arguments.arguments"/>
>          </elementProp>
>          <stringProp
> name="HTTPSampler.domain">http://10.28.123.55</stringProp>
>          <stringProp name="HTTPSampler.port">8081</stringProp>
>          <stringProp name="HTTPSampler.connect_timeout"></stringProp>
>          <stringProp name="HTTPSampler.response_timeout"></stringProp>
>          <stringProp name="HTTPSampler.protocol"></stringProp>
>          <stringProp name="HTTPSampler.contentEncoding"></stringProp>
>          <stringProp name="HTTPSampler.path"></stringProp>
>        </ConfigTestElement>
>        <hashTree/>
>        <WhileController guiclass="WhileControllerGui"
> testclass="WhileController" testname="While Controller" enabled="true">
>          <stringProp name="WhileController.condition">LAST</stringProp>
>        </WhileController>
>        <hashTree>
>          <ConfigTestElement guiclass="HttpDefaultsGui"
> testclass="ConfigTestElement" testname="HTTP Request Defaults"
> enabled="true">
>            <elementProp name="HTTPsampler.Arguments"
> elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments"
> testname="User Defined Variables" enabled="true">
>              <collectionProp name="Arguments.arguments"/>
>            </elementProp>
>            <stringProp name="HTTPSampler.domain">http://10.28.123.55 ;
> Path
> .*</stringProp>
>            <stringProp name="HTTPSampler.port">8081</stringProp>
>            <stringProp name="HTTPSampler.connect_timeout"></stringProp>
>            <stringProp name="HTTPSampler.response_timeout"></stringProp>
>            <stringProp name="HTTPSampler.protocol"></stringProp>
>            <stringProp name="HTTPSampler.contentEncoding"></stringProp>
>            <stringProp name="HTTPSampler.path"></stringProp>
>          </ConfigTestElement>
>          <hashTree/>
>          <AnchorModifier guiclass="AnchorModifierGui"
> testclass="AnchorModifier" testname="HTML Link Parser" enabled="true"/>
>          <hashTree/>
>        </hashTree>
>        <ResultCollector guiclass="ViewResultsFullVisualizer"
> testclass="ResultCollector" testname="View Results Tree" enabled="true">
>          <boolProp name="ResultCollector.error_logging">false</boolProp>
>          <objProp>
>            <name>saveConfig</name>
>            <value class="SampleSaveConfiguration">
>              <time>true</time>
>              <latency>true</latency>
>              <timestamp>true</timestamp>
>              <success>true</success>
>              <label>true</label>
>              <code>true</code>
>              <message>true</message>
>              <threadName>true</threadName>
>              <dataType>true</dataType>
>              <encoding>false</encoding>
>              <assertions>true</assertions>
>              <subresults>true</subresults>
>              <responseData>false</responseData>
>              <samplerData>false</samplerData>
>              <xml>true</xml>
>              <fieldNames>false</fieldNames>
>              <responseHeaders>false</responseHeaders>
>              <requestHeaders>false</requestHeaders>
>              <responseDataOnError>false</responseDataOnError>
>
>
> <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessag
> e>
>              <assertionsResultsToSave>0</assertionsResultsToSave>
>              <bytes>true</bytes>
>            </value>
>          </objProp>
>          <stringProp name="filename"></stringProp>
>        </ResultCollector>
>        <hashTree/>
>      </hashTree>
>    </hashTree>
>  </hashTree>
> </jmeterTestPlan>
>
>
>
> On 11/17/09 5:36 AM, "Jason James" <mr...@gmail.com> wrote:
>
> > Hi folks,
> >
> > I am using Jmeter ver 2.3.4
> >
> > I had been trying to get the Jmeter spidering working, the recipe in
> > the docs I found just did not work. I was finding that the documented
> > example
> >
> > 1. did not loop
> > 2. would go back to th etop level http://www.mysite.org/.* and die
> > without re-spidering.
> >
> > Here is my working testplan:
> >
> > Thread Group [action to be taken after a sampler error = continue]
> > - HTTP Request [server name or IP = www.mysite.org]
> > - While Controller [Condition = LAST] You must type LAST
> > - - HTTP Request [server name www.mysite.org ; Path .*]
> > - - Link Parser
> >
> > and that's it. The crucial things here were
> > .: the While Controller with the LAST option for the Condition
> > .: Also the documentation tells you to put server = .* in the first
> > HTTP Request : do that and you will spider the whole web!
> > .: setting action = continue in the Thread Group
> >
> > Once all this was in place I found I could randomly trawl my clients
> > site with about 60,000 pages. I could ramp up the number of users to
> > simulate a load of people randomly hitting the site. Insertion of a
> > Timer Controller with a Gaussian distribution helps make it a bit more
> > random.
> >
> > Happy spidering.
> >
> > Jason
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

Re: Jmeter spidering : working example tutorial

Posted by Carl Shaulis <cs...@homeaway.com>.
This e-mail makes spidering sound extremely easy.  I attempted to follow
these steps but no success.  Here is the script for keen eyes.

I am assuming that I do not need to start with a .csv file of URLs.

Is that a bad assumption?

Thanks,

Carl

<?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">
      <stringProp name="TestPlan.comments"></stringProp>
      <boolProp name="TestPlan.functional_mode">false</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>
      <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup"
testname="Sparky Spider" enabled="true">
        <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">1</stringProp>
        </elementProp>
        <stringProp name="ThreadGroup.num_threads">1</stringProp>
        <stringProp name="ThreadGroup.ramp_time">1</stringProp>
        <longProp name="ThreadGroup.start_time">1258670311000</longProp>
        <longProp name="ThreadGroup.end_time">1258670311000</longProp>
        <boolProp name="ThreadGroup.scheduler">false</boolProp>
        <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
        <stringProp name="ThreadGroup.duration"></stringProp>
        <stringProp name="ThreadGroup.delay"></stringProp>
      </ThreadGroup>
      <hashTree>
        <ConfigTestElement guiclass="HttpDefaultsGui"
testclass="ConfigTestElement" testname="HTTP Request Defaults"
enabled="true">
          <elementProp name="HTTPsampler.Arguments" elementType="Arguments"
guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined
Variables" enabled="true">
            <collectionProp name="Arguments.arguments"/>
          </elementProp>
          <stringProp
name="HTTPSampler.domain">http://10.28.123.55</stringProp>
          <stringProp name="HTTPSampler.port">8081</stringProp>
          <stringProp name="HTTPSampler.connect_timeout"></stringProp>
          <stringProp name="HTTPSampler.response_timeout"></stringProp>
          <stringProp name="HTTPSampler.protocol"></stringProp>
          <stringProp name="HTTPSampler.contentEncoding"></stringProp>
          <stringProp name="HTTPSampler.path"></stringProp>
        </ConfigTestElement>
        <hashTree/>
        <WhileController guiclass="WhileControllerGui"
testclass="WhileController" testname="While Controller" enabled="true">
          <stringProp name="WhileController.condition">LAST</stringProp>
        </WhileController>
        <hashTree>
          <ConfigTestElement guiclass="HttpDefaultsGui"
testclass="ConfigTestElement" testname="HTTP Request Defaults"
enabled="true">
            <elementProp name="HTTPsampler.Arguments"
elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments"
testname="User Defined Variables" enabled="true">
              <collectionProp name="Arguments.arguments"/>
            </elementProp>
            <stringProp name="HTTPSampler.domain">http://10.28.123.55 ; Path
.*</stringProp>
            <stringProp name="HTTPSampler.port">8081</stringProp>
            <stringProp name="HTTPSampler.connect_timeout"></stringProp>
            <stringProp name="HTTPSampler.response_timeout"></stringProp>
            <stringProp name="HTTPSampler.protocol"></stringProp>
            <stringProp name="HTTPSampler.contentEncoding"></stringProp>
            <stringProp name="HTTPSampler.path"></stringProp>
          </ConfigTestElement>
          <hashTree/>
          <AnchorModifier guiclass="AnchorModifierGui"
testclass="AnchorModifier" testname="HTML Link Parser" enabled="true"/>
          <hashTree/>
        </hashTree>
        <ResultCollector guiclass="ViewResultsFullVisualizer"
testclass="ResultCollector" testname="View Results Tree" enabled="true">
          <boolProp name="ResultCollector.error_logging">false</boolProp>
          <objProp>
            <name>saveConfig</name>
            <value class="SampleSaveConfiguration">
              <time>true</time>
              <latency>true</latency>
              <timestamp>true</timestamp>
              <success>true</success>
              <label>true</label>
              <code>true</code>
              <message>true</message>
              <threadName>true</threadName>
              <dataType>true</dataType>
              <encoding>false</encoding>
              <assertions>true</assertions>
              <subresults>true</subresults>
              <responseData>false</responseData>
              <samplerData>false</samplerData>
              <xml>true</xml>
              <fieldNames>false</fieldNames>
              <responseHeaders>false</responseHeaders>
              <requestHeaders>false</requestHeaders>
              <responseDataOnError>false</responseDataOnError>
              
<saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessag
e>
              <assertionsResultsToSave>0</assertionsResultsToSave>
              <bytes>true</bytes>
            </value>
          </objProp>
          <stringProp name="filename"></stringProp>
        </ResultCollector>
        <hashTree/>
      </hashTree>
    </hashTree>
  </hashTree>
</jmeterTestPlan>



On 11/17/09 5:36 AM, "Jason James" <mr...@gmail.com> wrote:

> Hi folks,
> 
> I am using Jmeter ver 2.3.4
> 
> I had been trying to get the Jmeter spidering working, the recipe in
> the docs I found just did not work. I was finding that the documented
> example
> 
> 1. did not loop
> 2. would go back to th etop level http://www.mysite.org/.* and die
> without re-spidering.
> 
> Here is my working testplan:
> 
> Thread Group [action to be taken after a sampler error = continue]
> - HTTP Request [server name or IP = www.mysite.org]
> - While Controller [Condition = LAST] You must type LAST
> - - HTTP Request [server name www.mysite.org ; Path .*]
> - - Link Parser
> 
> and that's it. The crucial things here were
> .: the While Controller with the LAST option for the Condition
> .: Also the documentation tells you to put server = .* in the first
> HTTP Request : do that and you will spider the whole web!
> .: setting action = continue in the Thread Group
> 
> Once all this was in place I found I could randomly trawl my clients
> site with about 60,000 pages. I could ramp up the number of users to
> simulate a load of people randomly hitting the site. Insertion of a
> Timer Controller with a Gaussian distribution helps make it a bit more
> random.
> 
> Happy spidering.
> 
> Jason
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org