我们使用 Hudson 作为我们的 CI 工具。
我想配置一个 hudson 作业来发送基于 Maven 的项目的失败测试的测试报告。 (在可编辑电子邮件配置部分中为不稳定版本配置邮件主题)
我使用了 http://techkriti.wordpress.com/2008/08/30/using-groovy-with-hudson-to-send-rich-text-email/
但是测试用例的链接不起作用,因为所需的链接包含与该测试用例对应的特定模块的 groupId$artifactId
必需的链接: job-url/groupId$artifactId/build-number/testReport/package-name/classname.testname/
但是我们使用以下格式获得的链接是:job-url/build-number/testReport/package-name/classname。 testname/
使用格式:$HUDSON_URL/job/$PROJECT_NAME/$BUILD_NUMBER/testReport/$packageName/$className/$testName
知道如何访问 groupId 和 artifactId从脚本?
谢谢,
加亚斯里
We use Hudson as our CI tool.
And i wanted to configure a hudson job to send the test report for failed tests for maven based project. (configuring mail subject for Unstable builds in editable email configuration section)
I used the template as suggested in http://techkriti.wordpress.com/2008/08/30/using-groovy-with-hudson-to-send-rich-text-email/
But the links to test cases aren't working as the required link contains groupId$artifactId of the particular module corresponding to that test case
Required link : job-url/groupId$artifactId/build-number/testReport/package-name/classname.testname/
But the link which we get using the following format is : job-url/build-number/testReport/package-name/classname.testname/
Used format : $HUDSON_URL/job/$PROJECT_NAME/$BUILD_NUMBER/testReport/$packageName/$className/$testName
Any idea how to access groupId and artifactId from the script ?
Thanks,
Gayathri
发布评论
评论(1)
修改脚本中的变量 url,如下所示:(
如果参数不在其树中,getRelativePathFrom 方法将返回测试结果的绝对路径)
此解决方法解决了该问题。
谢谢,
加亚斯里
Modify the variable url in the script as follows:
(getRelativePathFrom method returns absolute path to the test result if the argument is not in its tree)
This workaround solves the issue.
Thanks,
Gayathri