2016-07-12 30 views
0

當我運行的命令,在非GUI模式我JMeter的性能測試:/jmeter -n -t TC_001_01.jmx -l result.jtl的XML文件格式如下產生:的XML JMeter的JTL結果文件的格式在分佈式模式下運行時是不正確的

<?xml version="1.0" encoding="UTF-8"?> 
<testResults version="1.2"> 
<sample t="2045" it="3927" lt="0" ts="1468310751311" s="true" lb="Access Home Page Transaction" rc="200" rm="Number of samples in transaction : 1, number of failing samples : 0" tn="Thread Group 1-1" ng="1" na="1"> 
<httpSample t="2045" it="0" lt="914" ts="1468310755221" s="true" lb="https://www.myserver.es" rc="200" rm="OK" tn="Thread Group 1-1" ng="1" na="1"> 
<assertionResult> 
    <name>Response Assertion</name> 
    <failure>false</failure> 
    <error>false</error> 
</assertionResult> 
<httpSample t="914" it="0" lt="914" ts="1468310755221" s="true" lb="https://www.myserver.es/" rc="302" rm="Moved Temporarily" tn="Thread Group 1-1" ng="1" na="1"/> 
<httpSample t="1129" it="0" lt="386" ts="1468310756137" s="true" lb="https://www.myserver.es/home" rc="200" rm="OK" tn="Thread Group 1-1" ng="1" na="1"/> 
</httpSample> 
</sample> 
... 

當運行相同的測試添加選項-r/jmeter -n -t TC_001_01.jmx -l result.jtl -r使用主從啓動它(分佈式)模式,以下Performance Testing in the Cloud with JMeter & AWS,輸出XML文件的格式是不同的:

<?xml version="1.0" encoding="UTF-8"?> 
<testResults version="1.2"> 
<statSample> 
<saveConfig> 
<time>true</time> 
<latency>true</latency> 
<timestamp>true</timestamp> 
<success>true</success> 
<label>true</label> 
<code>true</code> 
......... 
......... 
</saveConfig> 
<responseData></responseData> 
<responseCode></responseCode> 
......... 
......... 
</statSample> 

如何讓JMeter在分佈式模式下運行時發出XML文件的第一種格式? (我有一個用於生成HTML報告的XSLT模板。)

我回顧了jmeter.properties和user.properties文件,但沒有成功。我使用Jmeter 3.0和Jmeter-plugins-manager-0.8。

+0

以我的理解,它是預期的輸出。以分佈式和簡單模式生成的報告格式預期彼此不同。分佈式模式報告提供了每個JMeter從站的附加信息w.r.t。 SImilary,如果您在測試計劃中使用多個線程組,那麼您還需要更新此變量(對於分佈式模式)jmeter.save.saveservice.print_field_names = true – TestingWithArif

+0

我已經使用我的筆記本電腦作爲從站和主站運行相同的測試,並且我得到正確的XML格式。所以,似乎是與我正在使用的AWS配置相關的東西,也許與ssh隧道,rmi端口... – Gines

+0

您在本地網絡中嘗試過相同的嗎?使用兩臺不同的機器?結果應該是一樣的。我曾與AWS合作過,從不面臨任何不同的行爲。對於分佈式模式,報告應該相同。無論是否在AWS或本地網絡上都無關緊要。 – TestingWithArif

回答

0

好吧,最後我明白了。我沒有使用mode = Statistical,而是將它設置爲mode:Standard並解決了我的問題。

謝謝!

相關問題