Jenkins Junit Reporter 无法找到 xml 文件?
Jenkins Junit Reporter unable to locate xml file?
系统:Macbook Pro
目前我在我的 macbook pro 上使用 运行 Jenkins,但似乎 Jenkins Junit 报告 post 动作插件无法找到我的 .xml 报告,一旦我的 WebdriverIo 框架执行了我的测试脚本。
正在生成报告 xml 文件,包括触发测试,Jenkins 似乎无法找到我的 JUnit 报告文件夹?
您工作区的根目录是什么?
如果是\Users\joeblogs\Desktop\webdriverio2\
,那么reports\junit-result\*.xml
就够了。
您似乎在尝试提供绝对路径,也许可以尝试删除 \Users
之前的前两个 **
。
更重要的是...您在 Test Result
视图中看到了什么?你应该看到这样的东西:
让我们找出问题!
wdio.conf.js
文件中的 JUnit reporter 设置;
- Post-build Actions JUnit reporter 设置(in Jenkins);
- 验证构建
Workspace
(在 Jenkins 中,post test-运行);
- 其他
1.
(我的 JUnit Reporter wdio.conf.js
配置)
reporters: ['junit'],
reporterOptions: {
'junit': {
outputDir: './reports',
outputFileFormat: function(opts) {
return `results-webdriverio.${process.env.USER}.${opts.cid}.xml`;
}
}
}
2.
(我对 JUnit Reporter 的设置)
您很可能对 JUnit .xml
的路径有疑问。使用相对路径! (例如:reports/*.xml
、reports/**/*.xml
等)。
Note: Basedir of the fileset is the workspace root.
3.
检查您的构建 Workspace
并查看 .xml
报告是否确实已生成并位于您的路径中(例如:在 /reports
文件夹中)。
如果不是,那么我会进入 Console
部分并开始查看您的构建日志以查看问题出在哪里。
!注意: 我得到了相同的 Jenkins 输入错误(红色通知),但据我所知,我一直总是得到他们。 .xml
报告仍由 JUnit 插件进行评估。
系统:Macbook Pro
目前我在我的 macbook pro 上使用 运行 Jenkins,但似乎 Jenkins Junit 报告 post 动作插件无法找到我的 .xml 报告,一旦我的 WebdriverIo 框架执行了我的测试脚本。
正在生成报告 xml 文件,包括触发测试,Jenkins 似乎无法找到我的 JUnit 报告文件夹?
您工作区的根目录是什么?
如果是\Users\joeblogs\Desktop\webdriverio2\
,那么reports\junit-result\*.xml
就够了。
您似乎在尝试提供绝对路径,也许可以尝试删除 \Users
之前的前两个 **
。
更重要的是...您在 Test Result
视图中看到了什么?你应该看到这样的东西:
让我们找出问题!
wdio.conf.js
文件中的 JUnit reporter 设置;- Post-build Actions JUnit reporter 设置(in Jenkins);
- 验证构建
Workspace
(在 Jenkins 中,post test-运行); - 其他
1.
(我的 JUnit Reporter wdio.conf.js
配置)
reporters: ['junit'],
reporterOptions: {
'junit': {
outputDir: './reports',
outputFileFormat: function(opts) {
return `results-webdriverio.${process.env.USER}.${opts.cid}.xml`;
}
}
}
2.
(我对 JUnit Reporter 的设置)
您很可能对 JUnit .xml
的路径有疑问。使用相对路径! (例如:reports/*.xml
、reports/**/*.xml
等)。
Note: Basedir of the fileset is the workspace root.
3.
检查您的构建 Workspace
并查看 .xml
报告是否确实已生成并位于您的路径中(例如:在 /reports
文件夹中)。
如果不是,那么我会进入 Console
部分并开始查看您的构建日志以查看问题出在哪里。
!注意: 我得到了相同的 Jenkins 输入错误(红色通知),但据我所知,我一直总是得到他们。 .xml
报告仍由 JUnit 插件进行评估。