2016-12-07 104 views
1

我在pom.xmlJMeter的,Maven的插件庫管理

<plugins> 
     <plugin> 
      <groupId>com.lazerycode.jmeter</groupId> 
      <artifactId>jmeter-maven-plugin</artifactId> 
      <version>${jmeter.maven.plugin.version}</version> 
      <configuration> 
       <jmeterExtensions> 
        <artifact>kg.apc:jmeter-plugins-json:2.4</artifact> 
        <artifact>kg.apc:jmeter-plugins-casutg:2.1</artifact> 
       </jmeterExtensions> 
       <junitLibraries> 
        <artifact>com.microsoft.sqlserver:sqljdbc4:4.0</artifact> 
       </junitLibraries> 
       <testFilesIncluded> 
        <jMeterTestFile>${tests.include}</jMeterTestFile> 
       </testFilesIncluded> 
       <jMeterProcessJVMSettings> 
        <xms>2048</xms> 
        <xmx>2048</xmx> 
       </jMeterProcessJVMSettings> 
       <customPropertiesFiles> 
        <!-- Custom property file --> 
       </customPropertiesFiles> 
       <propertiesJMeter> 
        <!-- Some properties that I pass into jmeter --> 
       </propertiesJMeter> 
      </configuration> 
      <executions> 
       <execution> 
        <id>jmeter-tests</id> 
        <phase>verify</phase> 
        <goals> 
         <goal>jmeter</goal> 
        </goals> 
       </execution> 
      </executions> 
     </plugin> 

這種插件的配置我跑mvn clean verify後,我得到這樣libsat /target/jmeter/lib/

json-path-2.1.0.jar json-path-2.2.0.jar

,並在日誌文件中我看到即從JMeter的時間沒有時間這樣的例外:

jmeter.extractor.json.jsonpath.JSONPostProcessor: Error processing JSON content in Select Team Name, message:Could not compile inline filter : [?(@.id=="29011")]

注意,這[?(@.id=="29011")]只是表達的一部分。充分表達是看起來與此類似:$.teamData[?(@.id=="29011")].name

我希望,這個錯誤在某種程度上與此相關的多個庫

+3

不能切換到使用後的JMeter與最新的插件?因爲JMeter 3帶有內置的JSON提取器(使用json-path-2.2.0),並且jmeter-maven-plugin version> 2.0支持JMeter 3,所以你不需要插件,也不需要插件我認爲版本衝突。 –

+2

嗨UBIK,我認爲,也許他沒有時間/關心寫出滿足質量標準的詳細答案,或者他留下評論,指出提問者的正確方向。是的,我看不出有什麼問題。謝謝。 – Jahan

+0

@KirilS,我試圖刪除所有'jmeterExtensions',結果我得到異常有關附帶'JMeter的-插件,json'錯過'JSONPathExtractor'。我不能確切地說它在哪裏使用。但在我的測試中,我有很多jsonPath後置處理器。 –

回答