2016-11-09 3 views
1

내 Elasticsearch 배치에서 부하 테스트를 수행하고 싶습니다. _search Elasticsearch의 API는 검색 요청이있는 신체 데이터가 문서화 된대로 here 일 것으로 예상합니다.JMeter : 본문 데이터로 GET 요청을 보내는 방법?

그러나 GET 요청을 보내면 본문 데이터가 비어있는 것으로 보입니다. 내 서버의 로그뿐만 아니라 "결과 트리보기"에서도 확인할 수 있습니다. GET 퀘스트에서 신체 데이터를 전송하는 것이 허용되지 않습니까? 아니면 제가 잘못하고 있습니까? JMeter 3.0 r1743807을 사용하고 있습니다. Screenshot도 첨부됩니다. 당신이 JMeter를의 HTTP Request 샘플러를 사용하여 그것을 할 수 있지만, 스크립트를 통해 가능하다 :

<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="One-Dimension aggregation" enabled="true"> 
    <boolProp name="HTTPSampler.postBodyRaw">true</boolProp> 
    <elementProp name="HTTPsampler.Arguments" elementType="Arguments"> 
    <collectionProp name="Arguments.arguments"> 
     <elementProp name="" elementType="HTTPArgument"> 
     <boolProp name="HTTPArgument.always_encode">false</boolProp> 
     <stringProp name="Argument.value">{&#xd; 
    &quot;query&quot;: {&#xd; 
     &quot;filtered&quot;: {&#xd; 
     &quot;query&quot;: {&#xd; 
      &quot;query_string&quot;: {&#xd; 
      &quot;query&quot;: &quot;+_exists_:category_list&quot;,&#xd; 
      &quot;analyze_wildcard&quot;: true&#xd; 
      }&#xd; 
     }&#xd; 
     }&#xd; 
    },&#xd; 
    &quot;size&quot;: 0,&#xd; 
    &quot;aggs&quot;: {&#xd; 
     &quot;2&quot;: {&#xd; 
     &quot;terms&quot;: {&#xd; 
      &quot;field&quot;: &quot;category_list.raw&quot;,&#xd; 
      &quot;size&quot;: 20,&#xd; 
      &quot;order&quot;: {&#xd; 
      &quot;_count&quot;: &quot;desc&quot;&#xd; 
      }&#xd; 
     }&#xd; 
     }&#xd; 
    }&#xd; 
    }</stringProp> 
     <stringProp name="Argument.metadata">=</stringProp> 
     </elementProp> 
    </collectionProp> 
    </elementProp> 
    <stringProp name="HTTPSampler.domain"></stringProp> 
    <stringProp name="HTTPSampler.port"></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">/-*kibana*/_search/</stringProp> 
    <stringProp name="HTTPSampler.method">GET</stringProp> 
    <boolProp name="HTTPSampler.follow_redirects">true</boolProp> 
    <boolProp name="HTTPSampler.auto_redirects">false</boolProp> 
    <boolProp name="HTTPSampler.use_keepalive">true</boolProp> 
    <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> 
    <boolProp name="HTTPSampler.monitor">false</boolProp> 
    <stringProp name="HTTPSampler.embedded_url_re"></stringProp> 
</HTTPSamplerProxy> 

답변

1

나는 곧 answering similar question here

을 기억합니다. 위의 답변에서 솔루션을 구현하기 전에 How to Use BeanShell: JMeter's Favorite Built-in Component 문서에 익숙해지는 것이 좋습니다.

+0

지금은 BeanShell 또는 JSR223과 같은 모양 일 가능성이 있습니다. 그러나 JMeter에서이 https://bz.apache.org/bugzilla/show_bug.cgi?id=60358에 대한 버그를 제출했으며 해결 방법이 있습니다. 잘만되면이 문제는 곧 수정 될 것입니다. – sss3

관련 문제