Jenkins Junit Reporter无法定位xml文件?
系统:MacBookPro 目前我正在macbook pro上运行Jenkins,但Jenkins Junit report post actions插件似乎无法定位我的.xml报告,一旦我的WebdriverIo框架执行了我的测试脚本 正在生成报告xml文件,包括触发测试,Jenkins似乎无法找到我的JUnit reports文件夹?Jenkins Junit Reporter无法定位xml文件?,jenkins,selenium-webdriver,junit,webdriver-io,Jenkins,Selenium Webdriver,Junit,Webdriver Io,系统:MacBookPro 目前我正在macbook pro上运行Jenkins,但Jenkins Junit report post actions插件似乎无法定位我的.xml报告,一旦我的WebdriverIo框架执行了我的测试脚本 正在生成报告xml文件,包括触发测试,Jenkins似乎无法找到我的JUnit reports文件夹? 您的工作区的根是什么 如果是\Users\joeblogs\Desktop\webdriverio2\,那么reports\junitresult\*.xml
您的工作区的根是什么 如果是
\Users\joeblogs\Desktop\webdriverio2\
,那么reports\junitresult\*.xml
就足够了
似乎您正在尝试提供一个绝对路径,可能尝试在
\Users
之前删除前两个***
,更重要的是。。。您在测试结果视图中看到了什么?你应该看到这样的情况:
让我们把问题孤立起来
wdio.conf.js
文件中的JUnit reporter设置李>
工作区(在Jenkins中,测试后运行)李>
其他
1.
(MyJUnit Reporterwdio.conf.js
config)
2.
(我的JUnit Reporter设置)
很可能是JUnit.xml
的路径有问题。使用相对路径!(例如:reports/*.xml
,reports/***.xml
等)
注意:文件集的Basedir是工作区根目录
3.
检查您的构建工作区
,查看.xml
报告是否确实已生成并驻留在您的路径中(例如:在/reports
文件夹中)
如果没有,那么我会进入控制台
部分,开始查看构建日志,看看问题出在哪里
!注意:我收到了相同的Jenkins输入错误(红色通知),但据我所知,我一直收到这些错误。.xml
报告仍然由JUnit插件进行评估。此Sam有任何进展吗?
reporters: ['junit'],
reporterOptions: {
'junit': {
outputDir: './reports',
outputFileFormat: function(opts) {
return `results-webdriverio.${process.env.USER}.${opts.cid}.xml`;
}
}
}