Hi,

I am having problems making the RE extractor to work.

The Test Plan looks like this

HTTP Request
www.google.co.uk

BeanShell PostProcessor   //sebb informs us there is a bug in the
postprocessor and works like
print("${test}");       //a pre-processor

Regular Expression Extractor
ref name:  test
RegEx:  (.*)
Template $0$
Match No 1
Default Value: "Token Not found".

The returned result = ${test}

I attach the jmx

Thank You

Aidy
<jmeterTestPlan version="1.2" properties="1.8">
  <hashTree>
    <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Badboy 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>
      <stringProp name="TestPlan.user_define_classpath"></stringProp>
      <boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
      <boolProp name="TestPlan.functional_mode">false</boolProp>
      <stringProp name="TestPlan.comments"></stringProp>
    </TestPlan>
    <hashTree>
      <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" 
testname="Thread Group" enabled="true">
        <longProp name="ThreadGroup.start_time">1183639288000</longProp>
        <stringProp name="ThreadGroup.delay"></stringProp>
        <stringProp name="ThreadGroup.duration"></stringProp>
        <stringProp name="ThreadGroup.num_threads">1</stringProp>
        <boolProp name="ThreadGroup.scheduler">false</boolProp>
        <elementProp name="ThreadGroup.main_controller" 
elementType="LoopController" guiclass="LoopControlPanel" 
testclass="LoopController" testname="Loop Controller" enabled="true">
          <stringProp name="LoopController.loops">1</stringProp>
          <boolProp name="LoopController.continue_forever">false</boolProp>
        </elementProp>
        <longProp name="ThreadGroup.end_time">1183639288000</longProp>
        <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
        <stringProp name="ThreadGroup.ramp_time">1</stringProp>
      </ThreadGroup>
      <hashTree>
        <CookieManager guiclass="CookiePanel" testclass="CookieManager" 
testname="HTTP Cookie Manager" enabled="true">
          <boolProp name="CookieManager.clearEachIteration">false</boolProp>
          <collectionProp name="CookieManager.cookies"/>
        </CookieManager>
        <hashTree/>
        <UserParameters guiclass="UserParametersGui" testclass="UserParameters" 
testname="User Parameters" enabled="true">
          <collectionProp name="UserParameters.names">
            <stringProp name="VIEWSTATE">VIEWSTATE</stringProp>
            <stringProp name="jsessionid">jsessionid</stringProp>
          </collectionProp>
          <collectionProp name="UserParameters.thread_values">
            <collectionProp name="745697">
              <stringProp name=""></stringProp>
              <stringProp name=""></stringProp>
            </collectionProp>
          </collectionProp>
          <boolProp name="TestElement.per_iteration">true</boolProp>
          <boolProp name="UserParameters.per_iteration">false</boolProp>
        </UserParameters>
        <hashTree/>
        <LoopController guiclass="LoopControlPanel" testclass="LoopController" 
testname="Step 1" enabled="true">
          <stringProp name="LoopController.loops">1</stringProp>
          <boolProp name="LoopController.continue_forever">true</boolProp>
        </LoopController>
        <hashTree>
          <HTTPSampler guiclass="HttpTestSampleGui" testclass="HTTPSampler" 
testname="http://www.google.co.uk/"; enabled="true">
            <stringProp name="HTTPSampler.path">/</stringProp>
            <stringProp name="HTTPSampler.method">GET</stringProp>
            <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
            <stringProp name="HTTPSampler.protocol">http</stringProp>
            <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
            <stringProp name="HTTPSampler.port">80</stringProp>
            <elementProp name="HTTPsampler.Arguments" elementType="Arguments" 
guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="Argument List" 
enabled="true">
              <collectionProp name="Arguments.arguments"/>
            </elementProp>
            <stringProp name="HTTPSampler.mimetype"></stringProp>
            <stringProp name="HTTPSampler.FILE_FIELD"></stringProp>
            <stringProp name="HTTPSampler.monitor">false</stringProp>
            <stringProp name="HTTPSampler.domain">www.google.co.uk</stringProp>
            <stringProp name="HTTPSampler.FILE_NAME"></stringProp>
            <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
          </HTTPSampler>
          <hashTree>
            <BeanShellPostProcessor guiclass="TestBeanGUI" 
testclass="BeanShellPostProcessor" testname="BeanShell PostProcessor" 
enabled="true">
              <stringProp name="script">print(&quot;${test}&quot;);</stringProp>
            </BeanShellPostProcessor>
            <hashTree/>
            <RegexExtractor guiclass="RegexExtractorGui" 
testclass="RegexExtractor" testname="Regular Expression Extractor" 
enabled="true">
              <stringProp name="RegexExtractor.default">&quot;Token Not 
found&quot;.</stringProp>
              <stringProp name="RegexExtractor.regex">(.*)</stringProp>
              <stringProp name="RegexExtractor.useHeaders">false</stringProp>
              <stringProp name="RegexExtractor.template">$0$</stringProp>
              <stringProp name="RegexExtractor.match_number">1</stringProp>
              <stringProp name="RegexExtractor.refname">test</stringProp>
            </RegexExtractor>
            <hashTree/>
          </hashTree>
        </hashTree>
      </hashTree>
      <ResultCollector guiclass="ViewResultsFullVisualizer" 
testclass="ResultCollector" testname="View Results Tree" enabled="true">
        <objProp>
          <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>false</xml>
            <fieldNames>false</fieldNames>
            <responseHeaders>false</responseHeaders>
            <requestHeaders>false</requestHeaders>
            <responseDataOnError>false</responseDataOnError>
            
<saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
            <assertionsResultsToSave>0</assertionsResultsToSave>
          </value>
          <name>saveConfig</name>
        </objProp>
        <stringProp name="filename"></stringProp>
        <boolProp name="ResultCollector.error_logging">false</boolProp>
      </ResultCollector>
      <hashTree/>
    </hashTree>
  </hashTree>
</jmeterTestPlan>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to