2016-07-08 411 views
4

我是JMeter的新手,我試圖讓JMeter爲現有的測試腳本生成html報告儀表板。我不明白在處理任何異常,而日誌中顯示沒有問題生成報告:JMeter 3.0報告生成 - 爲什麼我的報告儀表板爲空?

2016/07/08 12:42:24 DEBUG - jmeter.report.dashboard.ReportGenerator: Start report generation 
2016/07/08 12:42:25 INFO - jmeter.report.processor.NormalizerSampleConsumer: Using format:ms to parse timeStamp field 
2016/07/08 12:42:25 DEBUG - jmeter.report.dashboard.ReportGenerator: Start samples processing 
2016/07/08 12:42:25 INFO - org.apache.jmeter.report.processor.AbstractSampleConsumer: class org.apache.jmeter.report.processor.AggregateConsumer#stopProducing(): beginDate produced 0 samples 
2016/07/08 12:42:25 INFO - org.apache.jmeter.report.processor.AbstractSampleConsumer: class org.apache.jmeter.report.processor.AggregateConsumer#stopProducing(): endDate produced 0 samples 
2016/07/08 12:42:25 INFO - org.apache.jmeter.report.processor.AbstractSampleConsumer: class org.apache.jmeter.report.processor.ApdexSummaryConsumer#stopProducing(): apdexSummary produced 0 samples 
2016/07/08 12:42:25 INFO - org.apache.jmeter.report.processor.AbstractSampleConsumer: class org.apache.jmeter.report.processor.RequestsSummaryConsumer#stopProducing(): requestsSummary produced 0 samples 
2016/07/08 12:42:25 INFO - org.apache.jmeter.report.processor.AbstractSampleConsumer: class org.apache.jmeter.report.processor.StatisticsSummaryConsumer#stopProducing(): statisticsSummary produced 0 samples 
2016/07/08 12:42:25 INFO - org.apache.jmeter.report.processor.AbstractSampleConsumer: class org.apache.jmeter.report.processor.ErrorsSummaryConsumer#stopProducing(): errorsSummary produced 0 samples 
2016/07/08 12:42:25 INFO - org.apache.jmeter.report.processor.AbstractSampleConsumer: class org.apache.jmeter.report.processor.graph.impl.LatencyVSRequestGraphConsumer#stopProducing(): latencyVsRequest produced 0 samples 
2016/07/08 12:42:25 INFO - org.apache.jmeter.report.processor.AbstractSampleConsumer: class org.apache.jmeter.report.processor.graph.impl.HitsPerSecondGraphConsumer#stopProducing(): hitsPerSecond produced 0 samples 
2016/07/08 12:42:25 INFO - org.apache.jmeter.report.processor.AbstractSampleConsumer: class org.apache.jmeter.report.processor.graph.impl.CodesPerSecondGraphConsumer#stopProducing(): codesPerSecond produced 0 samples 
2016/07/08 12:42:25 INFO - org.apache.jmeter.report.processor.AbstractSampleConsumer: class org.apache.jmeter.report.processor.graph.impl.ResponseTimeVSRequestGraphConsumer#stopProducing(): responseTimeVsRequest produced 0 samples 
2016/07/08 12:42:25 INFO - org.apache.jmeter.report.processor.AbstractSampleConsumer: class org.apache.jmeter.report.processor.FilterConsumer#stopProducing(): startIntervalControlerFilter produced 4175 samples 
2016/07/08 12:42:25 INFO - org.apache.jmeter.report.processor.AbstractSampleConsumer: class org.apache.jmeter.report.processor.graph.impl.ResponseTimePercentilesGraphConsumer#stopProducing(): responseTimePercentiles produced 0 samples 
2016/07/08 12:42:25 INFO - org.apache.jmeter.report.processor.AbstractSampleConsumer: class org.apache.jmeter.report.processor.graph.impl.ResponseTimeOverTimeGraphConsumer#stopProducing(): responseTimesOverTime produced 0 samples 
2016/07/08 12:42:25 INFO - org.apache.jmeter.report.processor.AbstractSampleConsumer: class org.apache.jmeter.report.processor.graph.impl.BytesThroughputGraphConsumer#stopProducing(): bytesThroughputOverTime produced 0 samples 
2016/07/08 12:42:25 INFO - org.apache.jmeter.report.processor.AbstractSampleConsumer: class org.apache.jmeter.report.processor.graph.impl.ActiveThreadsGraphConsumer#stopProducing(): activeThreadsOverTime produced 0 samples 
2016/07/08 12:42:25 INFO - org.apache.jmeter.report.processor.AbstractSampleConsumer: class org.apache.jmeter.report.processor.graph.impl.TimeVSThreadGraphConsumer#stopProducing(): timeVsThreads produced 0 samples 
2016/07/08 12:42:25 INFO - org.apache.jmeter.report.processor.AbstractSampleConsumer: class org.apache.jmeter.report.processor.graph.impl.ResponseTimeDistributionGraphConsumer#stopProducing(): responseTimeDistribution produced 0 samples 
2016/07/08 12:42:25 INFO - org.apache.jmeter.report.processor.AbstractSampleConsumer: class org.apache.jmeter.report.processor.graph.impl.LatencyOverTimeGraphConsumer#stopProducing(): latenciesOverTime produced 0 samples 
2016/07/08 12:42:25 INFO - org.apache.jmeter.report.processor.AbstractSampleConsumer: class org.apache.jmeter.report.processor.graph.impl.TransactionsPerSecondGraphConsumer#stopProducing(): transactionsPerSecond produced 0 samples 
2016/07/08 12:42:25 INFO - org.apache.jmeter.report.processor.AbstractSampleConsumer: class org.apache.jmeter.report.processor.FilterConsumer#stopProducing(): nameFilter produced 10020 samples 
2016/07/08 12:42:25 INFO - org.apache.jmeter.report.processor.AbstractSampleConsumer: class org.apache.jmeter.report.processor.NormalizerSampleConsumer#stopProducing(): normalizer produced 2505 samples 
2016/07/08 12:42:25 INFO - org.apache.jmeter.report.processor.CsvFileSampleSource: produce(): 835 samples produced in 481ms on channel 0 
2016/07/08 12:42:25 DEBUG - jmeter.report.dashboard.ReportGenerator: End of samples processing 
2016/07/08 12:42:25 DEBUG - jmeter.report.dashboard.ReportGenerator: Start data exporting 
2016/07/08 12:42:25 INFO - jmeter.report.dashboard.ReportGenerator: Exporting data using exporter:'html' of className:'org.apache.jmeter.report.dashboard.HtmlTemplateExporter' 
2016/07/08 12:42:25 DEBUG - jmeter.report.dashboard.HtmlTemplateExporter: Start template processing 
2016/07/08 12:42:25 INFO - jmeter.report.dashboard.HtmlTemplateExporter: Will generate dashboard in folder:/tmp/jmeter 
2016/07/08 12:42:26 INFO - jmeter.report.dashboard.HtmlTemplateExporter: Report will be generated in:/tmp/jmeter, creating folder structure 
2016/07/08 12:42:26 DEBUG - jmeter.report.dashboard.HtmlTemplateExporter: End of template processing 
2016/07/08 12:42:26 DEBUG - jmeter.report.dashboard.ReportGenerator: End of data exporting 
2016/07/08 12:42:26 DEBUG - jmeter.report.dashboard.ReportGenerator: End of report generation 

然而,當我查看生成index.html文件,沒有數據:

enter image description here

的result.csv文件不爲空,但:

enter image description here

我reportgenerator和saveservic e-config中是:

#--------------------------------------------------------------------------- 
# Reporting configuration 
#--------------------------------------------------------------------------- 
# If you want to debug reporting, uncomment this line 
log_level.jmeter.report=DEBUG 
jmeter.reportgenerator.report_title=AMP JMeter-test Dashboard 
jmeter.reportgenerator.overall_granularity=6000 
jmeter.reportgenerator.temp_dir = /tmp 
#--------------------------------------------------------------------------- 
# Results file configuration 
#--------------------------------------------------------------------------- 
jmeter.save.saveservice.output_format=csv 
# assertion_results_failure_message only affects CSV output 
jmeter.save.saveservice.assertion_results_failure_message=true 
jmeter.save.saveservice.assertion_results=all 
#jmeter.save.saveservice.data_type=true 
jmeter.save.saveservice.label=true 
jmeter.save.saveservice.response_code=true 

jmeter.save.saveservice.response_message=true 
jmeter.save.saveservice.successful=true 
jmeter.save.saveservice.thread_name=true 
jmeter.save.saveservice.time=true 
jmeter.save.saveservice.subresults=true 
jmeter.save.saveservice.assertions=true 
jmeter.save.saveservice.latency=true 
jmeter.save.saveservice.bytes=true 
jmeter.save.saveservice.thread_counts=true 
jmeter.save.saveservice.timestamp_format=ms 
jmeter.save.saveservice.default_delimiter=, 
jmeter.save.saveservice.print_field_names=true 

csvread.delimiter=, 

我試圖尋找類似的問題(這裏和其他地方),但我無法找到任何解決這樣的情況。結果正在以我期望的格式寫入和填充到CSV文件中,但在讀取數據時似乎出現了一些問題。如果我至少可以得到錯誤和結果摘要部分,我會很高興在這一點上。我注意到在日誌(包含在代碼片段中)中,有很多不同的事件報告了0個樣本......但我想我只關心CsvFileSampleSource,它正確地標識爲具有800-什麼樣...

而且,我跑我的測試,如:這裏

jmeter -n -t /path/to/my/amp_automation.jmx -l /tmp/result.csv -e -o /tmp/jmeter 

任何有識之士將不勝感激,我可以突出部分失去了一些東西。理想情況下,我不希望恢復爲獲取爲jmeter生成的html報告(與螞蟻或其他聽衆等)的「老」方式。

謝謝!

回答

-1

我認爲你需要user.properties添加的類似: jmeter.reportgenerator.exporter.html.series_filter =((^您的標籤名稱)|(^ ...))( - 成功| -failure )?


正如您提供的result.csv內容。 也許你可以添加如下:

jmeter.reportgenerator.exporter.html.series_filter =((^ login)|(^ create user))( - success | -failure)?

我建議你可以將你的reportgenerator.properties中的全部內容粘貼到user.properties。然後設置「jmeter.reportgenerator.exporter.html.series_filter」可以快速解決您的問題。 希望這可以幫助你。祝你好運。

0

請使用以下命令生成在cmd中報告爲什麼,因爲你已經有了結果csv文件,這個文件就可以生成報告,請使用以下命令生成報告,按您的結果CSV文件。

在CMD首先你需要去在cmd中JMeter的/ bin文件夾然後在下面的命令進入,並與路徑替換

jmeter -g E:\Jmeter_Performance_Testing\Silver\SAPPI_Redemption\TestResults\SAPPIRedemption.csv -o E:\Jmeter_Performance_Testing\Silver\SAPPI_Redemption\HTMLReports 

JMeter的-g路徑(在結果CSV文件的路徑)-O路徑(報告應顯示在哪裏的路徑)。 讓我知道您的反饋。

1

在你user.properties文件中嘗試添加:

jmeter.reportgenerator.sample_filter=.* 
    jmeter.reportgenerator.exporter.html.series_filter=.* 

,如前面提到的答案檢查你的過濾。

對於調試目的,我建議你分離出來的儀表盤代運行後只是用命令行-g選項調試這個問題,所以你會得到一個不太繁忙的jmeter.log

看JMeter的。記錄它應該精確顯示正在讀取哪些值以及如何設置。你想確保你不傳遞一個「None」值,特別是對於sample_filter!

1

從那裏,你想打開的報告? 其他生成的文件夾如內容,sbadmin是在相同的位置?

我改變了index.html文件,所以我面臨同樣的問題的地方。 請確保您正在訪問jmeter創建的文件夾中的index.html文件。

+0

我面臨同樣的問題。謝謝@Mohini – Tejas

1

我今天遇到類似的情況,並在調查網頁,我發現從JavaScript生成的圖表。當我在Chrome瀏覽器中查看開發控制檯時,發現嵌入在JavaScript中的雙引號引起的語法錯誤。我還沒有100%的解決方案,但認爲這可能是你要檢查的東西。我從我的csv文件中刪除了轉義引號,並重新生成了我的報告,並獲得了我期待的輸出結果。

1

我有類似的問題。我意識到我使用雙引號作爲.jtl報告中的一個HTTP請求名稱。我從jtl中刪除了雙引號,重新生成了儀表板。它像一個魅力!