当将Maven与surefire一起使用时,Jenkins的TestNG XML报告模式是什么? [英] What is the TestNG XML report pattern for Jenkins when using Maven with surefire?
问题描述
我正在使用TestNG Results插件. 我将TestNG XML报告模式定义为:** \ target \ surefire-reports \ testng-results.xml 我收到此错误: TestNG报告处理:START 使用以下模式在工作区中查找TestNG结果报告:** \ target \ surefire-reports \ testng-results.xml 找不到任何匹配的文件.
I'm using TestNG Results Plugin. I defined TestNG XML report pattern as: **\target\surefire-reports\testng-results.xml I'm getting this error: TestNG Reports Processing: START Looking for TestNG results report in workspace using pattern: **\target\surefire-reports\testng-results.xml Did not find any matching files.
正确的模式应该是什么?
What should be the correct pattern?
推荐答案
我刚刚解决了这个问题!
I just fixed this problem!
这是因为当前目录已更改为默认的Jenkins工作区,运行时类似于"/Users/Shared/Jenkins/Home/workspace/your_project_name"!
It's because that the current directory was changed to the default Jenkins workspace, something like '/Users/Shared/Jenkins/Home/workspace/your_project_name' when it ran!!
如果在Jenkins项目的配置中的后构建操作"之前添加外壳命令"pwd",您将自己找到它.
You will find it yourself if you add shell command 'pwd' before Post-build Actions in the Configuration of your project in Jenkins.
您只需要在常规->高级...->使用自定义工作区中配置项目,并填写项目的完整路径即可!
You just need configure your project in General -> Advanced... -> Use custom workspace, and fill in the full path of your project, and it will work!!!
这篇关于当将Maven与surefire一起使用时,Jenkins的TestNG XML报告模式是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!