Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
jenkins
提交
dd2b4a18
J
jenkins
项目概览
xxadev
/
jenkins
与 Fork 源项目一致
从无法访问的项目Fork
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
J
jenkins
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
dd2b4a18
编写于
9月 13, 2013
作者:
S
Stefan Wolf
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[FIXED JENKINS-9637] Make link on Job page to aggregated Test result appear correctly
上级
7ec87871
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
30 addition
and
15 deletion
+30
-15
core/src/main/resources/hudson/model/AbstractProject/main.jelly
...rc/main/resources/hudson/model/AbstractProject/main.jelly
+12
-9
test/src/test/java/hudson/tasks/test/AggregatedTestResultPublisherTest.java
.../hudson/tasks/test/AggregatedTestResultPublisherTest.java
+18
-6
未找到文件。
core/src/main/resources/hudson/model/AbstractProject/main.jelly
浏览文件 @
dd2b4a18
...
...
@@ -31,7 +31,7 @@ THE SOFTWARE.
</j:if>
<p:projectActionFloatingBox />
<table style="margin-top: 1em; margin-left:1em;">
<j:forEach var="act" items="${it.prominentActions}">
...
...
@@ -53,7 +53,7 @@ THE SOFTWARE.
<j:set var="tr" value="${it.lastCompletedBuild.testResultAction}"/>
<j:if test="${tr!=null}">
<j:if test="${tr.class.name != 'hudson.tasks.test.AggregatedTestResultAction'}">
<j:if test="${tr.class.name != 'hudson.tasks.test.AggregatedTestResult
Publisher$TestResult
Action'}">
<t:summary icon="clipboard.png">
<a href="lastCompletedBuild/${tr.urlName}/" class="model-link inside">${%Latest Test Result}</a>
<t:test-result it="${tr}" />
...
...
@@ -61,13 +61,16 @@ THE SOFTWARE.
</j:if>
</j:if>
<j:set var="atr" value="${it.lastCompletedBuild.aggregatedTestResultAction}"/>
<j:if test="${atr!=null}">
<t:summary icon="clipboard.png">
<a href="lastCompletedBuild/aggregatedTestReport/" class="model-link inside">${%Latest Aggregated Test Result}</a>
<t:test-result it="${atr}" />
</t:summary>
</j:if>
<j:forEach var="atr" items="${it.lastCompletedBuild.actions}">
<j:if test="${atr!=null}">
<j:if test="${atr.class.name == 'hudson.tasks.test.AggregatedTestResultPublisher$TestResultAction'}">
<t:summary icon="clipboard.png">
<a href="lastCompletedBuild/${atr.urlName}/" class="model-link inside">${%Latest Aggregated Test Result}</a>
<t:test-result it="${atr}" />
</t:summary>
</j:if>
</j:if>
</j:forEach>
</table>
...
...
test/src/test/java/hudson/tasks/test/AggregatedTestResultPublisherTest.java
浏览文件 @
dd2b4a18
...
...
@@ -56,9 +56,10 @@ public class AggregatedTestResultPublisherTest {
buildAndSetupPageObjects
();
projectPage
.
getLatestAggregatedTestReportLink
()
.
assertHasLatestTestResultText
()
.
assertHasLatest
Aggregated
TestResultText
()
.
assertHasTests
()
.
follow
().
hasLinkToTestResultOfBuild
(
TEST_PROJECT_NAME
,
1
);
projectPage
.
assertNoTestReportLink
();
buildPage
.
getAggregatedTestReportLink
()
...
...
@@ -80,7 +81,10 @@ public class AggregatedTestResultPublisherTest {
.
assertHasLatestTestResultText
()
.
assertHasTests
()
.
follow
();
projectPage
.
assertNoAggregatedTestReportLink
();
projectPage
.
getLatestAggregatedTestReportLink
()
.
assertHasLatestAggregatedTestResultText
()
.
assertNoTests
()
.
follow
();
buildPage
.
getTestReportLink
()
.
assertHasTestResultText
()
...
...
@@ -88,7 +92,8 @@ public class AggregatedTestResultPublisherTest {
.
follow
();
buildPage
.
getAggregatedTestReportLink
()
.
assertHasAggregatedTestResultText
()
.
assertNoTests
();
.
assertNoTests
()
.
follow
();
}
@LocalData
...
...
@@ -103,7 +108,10 @@ public class AggregatedTestResultPublisherTest {
.
assertHasLatestTestResultText
()
.
assertHasTests
()
.
follow
();
projectPage
.
assertNoAggregatedTestReportLink
();
projectPage
.
getLatestAggregatedTestReportLink
()
.
assertHasLatestAggregatedTestResultText
()
.
assertHasTests
()
.
follow
();
buildPage
.
getTestReportLink
()
.
assertHasTestResultText
()
...
...
@@ -123,11 +131,15 @@ public class AggregatedTestResultPublisherTest {
}
private
void
buildOnce
()
throws
Exception
{
build
(
1
);
}
private
void
build
(
int
numberOfDownstreamBuilds
)
throws
Exception
{
build
=
j
.
buildAndAssertSuccess
(
upstreamProject
);
j
.
waitUntilNoActivity
();
List
<
AbstractBuild
<?,
?>>
downstreamBuilds
=
ImmutableList
.
copyOf
(
build
.
getDownstreamBuilds
(
downstreamProject
));
assertThat
(
downstreamBuilds
,
hasSize
(
1
));
assertThat
(
downstreamBuilds
,
hasSize
(
numberOfDownstreamBuilds
));
}
...
...
@@ -169,7 +181,7 @@ public class AggregatedTestResultPublisherTest {
private
void
addFingerprinterToProject
(
FreeStyleProject
project
,
String
[]
contents
,
String
[]
files
)
throws
Exception
{
StringBuilder
targets
=
new
StringBuilder
();
for
(
int
i
=
0
;
i
<
contents
.
length
;
i
++)
{
project
.
getBuildersList
().
add
(
new
Shell
(
"echo "
+
contents
[
i
]
+
" > "
+
files
[
i
]));
project
.
getBuildersList
().
add
(
new
Shell
(
"echo
$BUILD_NUMBER
"
+
contents
[
i
]
+
" > "
+
files
[
i
]));
targets
.
append
(
files
[
i
]).
append
(
','
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录