发布性能测试结果报告无法用Jmeter结果解析时间戳

问题描述 投票:0回答:1

发布性能测试结果报告无法用Jmeter结果解析时间戳。 IT 抛出以下错误。

Jmeter 脚本使用 jmx 文件运行,如下所示:

jmeter -n -t "C:\xxx\PageLoad\UI_Page_Loading.jmx" -l "C:\TestAutomation\PageLoad\Page_Loading.csv"

Jmeter版本:5.5 Jenkins插件:性能插件版本962.v95a_4913d332e 詹金斯版本:2.472

Performance: Failed to parse file 'C:\Windows\system32\config\systemprofile\AppData\Local\Jenkins\.jenkins\jobs\xxx\jobs\PERFORMANCE TEST\jobs\xxx\builds\1\performance-reports\JMeterCSV\PageLoading.csv': Cannot parse timestamp: ue. Please, use one of supported formats: [yyyy/MM/dd HH:mm:ss.SSS, yyyy-MM-dd HH:mm:ss.SSS, yyyy-MM-dd HH:mm:ss,SSS, yyyy/mm/dd HH:mm:ss]
java.lang.IllegalArgumentException: Cannot parse timestamp: ue. Please, use one of supported formats: [yyyy/MM/dd HH:mm:ss.SSS, yyyy-MM-dd HH:mm:ss.SSS, yyyy-MM-dd HH:mm:ss,SSS, yyyy/mm/dd HH:mm:ss]
    at PluginClassLoader for performance//hudson.plugins.performance.parsers.AbstractParser.initDateFormat(AbstractParser.java:242)
    at PluginClassLoader for performance//hudson.plugins.performance.parsers.AbstractParser.parseTimestamp(AbstractParser.java:207)
    at PluginClassLoader for performance//hudson.plugins.performance.parsers.JMeterCsvParser.getSample(JMeterCsvParser.java:133)
    at PluginClassLoader for performance//hudson.plugins.performance.parsers.JMeterCsvParser.parseCSV(JMeterCsvParser.java:77)
    at PluginClassLoader for performance//hudson.plugins.performance.parsers.JMeterCsvParser.parse(JMeterCsvParser.java:66)
    at PluginClassLoader for performance//hudson.plugins.performance.parsers.AbstractParser.parse(AbstractParser.java:85)
    at PluginClassLoader for performance//hudson.plugins.performance.PerformancePublisher.locatePerformanceReports(PerformancePublisher.java:481)
    at PluginClassLoader for performance//hudson.plugins.performance.PerformancePublisher.prepareEvaluation(PerformancePublisher.java:424)
    at PluginClassLoader for performance//hudson.plugins.performance.PerformancePublisher.perform(PerformancePublisher.java:395)
    at jenkins.tasks.SimpleBuildStep.perform(SimpleBuildStep.java:123)
    at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:80)
    at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
    at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:817)
    at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:766)
    at hudson.model.Build$BuildExecution.post2(Build.java:179)
    at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:710)
    at hudson.model.Run.execute(Run.java:1917)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:44)
    at hudson.model.ResourceController.execute(ResourceController.java:101)
    at hudson.model.Executor.run(Executor.java:446)
Caused by: java.lang.NumberFormatException: For input string: "ue"
    at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:67)
    at java.base/java.lang.Long.parseLong(Long.java:711)
    at java.base/java.lang.Long.valueOf(Long.java:1163)
    at PluginClassLoader for performance//hudson.plugins.performance.parsers.AbstractParser.initDateFormat(AbstractParser.java:238)
    ... 19 more```

jmeter jenkins-plugins
1个回答
0
投票

您的 .jtl 结果文件格式错误、不完整,或者您的 结果文件配置与性能插件期望的不同。

第一列应称为

timeStamp
,默认情况下其值应为自 Unix 纪元开始以来的毫秒数,例如
1724411689136

该列中包含

jmeter.save.saveservice.timestamp_format
,而不是此值(或任何支持的格式,如果您修改了
ue
属性,这不是性能插件所期望的。

因此,请检查并最终恢复所有 JMeter Properties 覆盖,并确保 .jtl 结果文件完整。还值得查看 jmeter.log 文件,看看它是否包含可疑条目

© www.soinside.com 2019 - 2024. All rights reserved.