最近在看 jenkins 和 jmeter。在 jenkins 上安装了 performance 插件之后配置绝对路径如下图:
构建项目提示错误:
ERROR: Step ‘Publish Performance test result report’ aborted due to exception:
java.io.FileNotFoundException: E:\Jenkins\jobs\jmeter-ant\builds\97\temp\E:\Jmeter\jmeter-case\ant-demo\report\jtl\*.jtl (文件名、目录名或卷标语法不正确。)
at java.io.FileOutputStream.open0(Native Method)
at java.io.FileOutputStream.open(Unknown Source)
at java.io.FileOutputStream.<init>(Unknown Source)
at java.io.FileOutputStream.<init>(Unknown Source)
at hudson.FilePath.write(FilePath.java:1879)
at hudson.FilePath.copyTo(FilePath.java:1980)
Caused: java.io.IOException: Failed to copy E:\Jmeter\jmeter-case\ant-demo\report\jtl\TestReport170609-08-00.jtl to E:\Jenkins\jobs\jmeter-ant\builds\97\temp\E:\Jmeter\jmeter-case\ant-demo\report\jtl\*.jtl
at hudson.FilePath.copyTo(FilePath.java:1984)
at hudson.FilePath.copyFrom(FilePath.java:910)
at hudson.plugins.performance.parsers.ParserFactory.getParser(ParserFactory.java:52)
at hudson.plugins.performance.PerformancePublisher.getParsers(PerformancePublisher.java:309)
at hudson.plugins.performance.PerformancePublisher.perform(PerformancePublisher.java:357)
at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:720)
at hudson.model.Build$BuildExecution.post2(Build.java:186)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:665)
at hudson.model.Run.execute(Run.java:1753)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:405)
Finished: FAILURE
非常奇怪的是这里的路径是叠加上去的。。很难理解,有大神知道是怎么回事吗?找了很久资料实在不懂为什么会出现这种情况Caused: java.io.IOException: Failed to copy E:\Jmeter\jmeter-case\ant-demo\report\jtl\TestReport170609-08-00.jtl to E:\Jenkins\jobs\jmeter-ant\builds\97\temp\E:\Jmeter\jmeter-case\ant-demo\report\jtl\*.jtl