Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
jenkins
提交
dd6eab43
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,发现更多精彩内容 >>
提交
dd6eab43
编写于
9月 17, 2013
作者:
S
Stefan Wolf
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #943 from wolfs/aggregate-test-result
[FIXED JENKINS-9637] More Fixes for Aggregated Test Result
上级
22693ab3
92e81bf0
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
33 addition
and
15 deletion
+33
-15
changelog.html
changelog.html
+3
-0
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
未找到文件。
changelog.html
浏览文件 @
dd6eab43
...
@@ -83,6 +83,9 @@ Upcoming changes</a>
...
@@ -83,6 +83,9 @@ Upcoming changes</a>
<li
class=
rfe
>
<li
class=
rfe
>
Use fine-grained permissions for node manipulation via REST API
&
CLI
Use fine-grained permissions for node manipulation via REST API
&
CLI
(
<a
href=
"https://issues.jenkins-ci.org/browse/JENKINS-18485"
>
issue 18485
</a>
)
(
<a
href=
"https://issues.jenkins-ci.org/browse/JENKINS-18485"
>
issue 18485
</a>
)
<li
class=
'bug'
>
Make the link to the aggregated test result from the project page work.
(
<a
href=
"https://issues.jenkins-ci.org/browse/JENKINS-9637"
>
issue 9637
</a>
)
</ul>
</ul>
</div>
<!--=END=-->
</div>
<!--=END=-->
<h3><a
name=
v1.531
>
What's new in 1.531
</a>
(2013/09/16)
</h3>
<h3><a
name=
v1.531
>
What's new in 1.531
</a>
(2013/09/16)
</h3>
...
...
core/src/main/resources/hudson/model/AbstractProject/main.jelly
浏览文件 @
dd6eab43
...
@@ -31,7 +31,7 @@ THE SOFTWARE.
...
@@ -31,7 +31,7 @@ THE SOFTWARE.
</j:if>
</j:if>
<p:projectActionFloatingBox />
<p:projectActionFloatingBox />
<table style="margin-top: 1em; margin-left:1em;">
<table style="margin-top: 1em; margin-left:1em;">
<j:forEach var="act" items="${it.prominentActions}">
<j:forEach var="act" items="${it.prominentActions}">
...
@@ -53,7 +53,7 @@ THE SOFTWARE.
...
@@ -53,7 +53,7 @@ THE SOFTWARE.
<j:set var="tr" value="${it.lastCompletedBuild.testResultAction}"/>
<j:set var="tr" value="${it.lastCompletedBuild.testResultAction}"/>
<j:if test="${tr!=null}">
<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">
<t:summary icon="clipboard.png">
<a href="lastCompletedBuild/${tr.urlName}/" class="model-link inside">${%Latest Test Result}</a>
<a href="lastCompletedBuild/${tr.urlName}/" class="model-link inside">${%Latest Test Result}</a>
<t:test-result it="${tr}" />
<t:test-result it="${tr}" />
...
@@ -61,13 +61,16 @@ THE SOFTWARE.
...
@@ -61,13 +61,16 @@ THE SOFTWARE.
</j:if>
</j:if>
</j:if>
</j:if>
<j:set var="atr" value="${it.lastCompletedBuild.aggregatedTestResultAction}"/>
<j:forEach var="atr" items="${it.lastCompletedBuild.actions}">
<j:if test="${atr!=null}">
<j:if test="${atr!=null}">
<t:summary icon="clipboard.png">
<j:if test="${atr.class.name == 'hudson.tasks.test.AggregatedTestResultPublisher$TestResultAction'}">
<a href="lastCompletedBuild/aggregatedTestReport/" class="model-link inside">${%Latest Aggregated Test Result}</a>
<t:summary icon="clipboard.png">
<t:test-result it="${atr}" />
<a href="lastCompletedBuild/${atr.urlName}/" class="model-link inside">${%Latest Aggregated Test Result}</a>
</t:summary>
<t:test-result it="${atr}" />
</j:if>
</t:summary>
</j:if>
</j:if>
</j:forEach>
</table>
</table>
...
...
test/src/test/java/hudson/tasks/test/AggregatedTestResultPublisherTest.java
浏览文件 @
dd6eab43
...
@@ -56,9 +56,10 @@ public class AggregatedTestResultPublisherTest {
...
@@ -56,9 +56,10 @@ public class AggregatedTestResultPublisherTest {
buildAndSetupPageObjects
();
buildAndSetupPageObjects
();
projectPage
.
getLatestAggregatedTestReportLink
()
projectPage
.
getLatestAggregatedTestReportLink
()
.
assertHasLatestTestResultText
()
.
assertHasLatest
Aggregated
TestResultText
()
.
assertHasTests
()
.
assertHasTests
()
.
follow
().
hasLinkToTestResultOfBuild
(
TEST_PROJECT_NAME
,
1
);
.
follow
().
hasLinkToTestResultOfBuild
(
TEST_PROJECT_NAME
,
1
);
projectPage
.
assertNoTestReportLink
();
projectPage
.
assertNoTestReportLink
();
buildPage
.
getAggregatedTestReportLink
()
buildPage
.
getAggregatedTestReportLink
()
...
@@ -80,7 +81,10 @@ public class AggregatedTestResultPublisherTest {
...
@@ -80,7 +81,10 @@ public class AggregatedTestResultPublisherTest {
.
assertHasLatestTestResultText
()
.
assertHasLatestTestResultText
()
.
assertHasTests
()
.
assertHasTests
()
.
follow
();
.
follow
();
projectPage
.
assertNoAggregatedTestReportLink
();
projectPage
.
getLatestAggregatedTestReportLink
()
.
assertHasLatestAggregatedTestResultText
()
.
assertNoTests
()
.
follow
();
buildPage
.
getTestReportLink
()
buildPage
.
getTestReportLink
()
.
assertHasTestResultText
()
.
assertHasTestResultText
()
...
@@ -88,7 +92,8 @@ public class AggregatedTestResultPublisherTest {
...
@@ -88,7 +92,8 @@ public class AggregatedTestResultPublisherTest {
.
follow
();
.
follow
();
buildPage
.
getAggregatedTestReportLink
()
buildPage
.
getAggregatedTestReportLink
()
.
assertHasAggregatedTestResultText
()
.
assertHasAggregatedTestResultText
()
.
assertNoTests
();
.
assertNoTests
()
.
follow
();
}
}
@LocalData
@LocalData
...
@@ -103,7 +108,10 @@ public class AggregatedTestResultPublisherTest {
...
@@ -103,7 +108,10 @@ public class AggregatedTestResultPublisherTest {
.
assertHasLatestTestResultText
()
.
assertHasLatestTestResultText
()
.
assertHasTests
()
.
assertHasTests
()
.
follow
();
.
follow
();
projectPage
.
assertNoAggregatedTestReportLink
();
projectPage
.
getLatestAggregatedTestReportLink
()
.
assertHasLatestAggregatedTestResultText
()
.
assertHasTests
()
.
follow
();
buildPage
.
getTestReportLink
()
buildPage
.
getTestReportLink
()
.
assertHasTestResultText
()
.
assertHasTestResultText
()
...
@@ -123,11 +131,15 @@ public class AggregatedTestResultPublisherTest {
...
@@ -123,11 +131,15 @@ public class AggregatedTestResultPublisherTest {
}
}
private
void
buildOnce
()
throws
Exception
{
private
void
buildOnce
()
throws
Exception
{
build
(
1
);
}
private
void
build
(
int
numberOfDownstreamBuilds
)
throws
Exception
{
build
=
j
.
buildAndAssertSuccess
(
upstreamProject
);
build
=
j
.
buildAndAssertSuccess
(
upstreamProject
);
j
.
waitUntilNoActivity
();
j
.
waitUntilNoActivity
();
List
<
AbstractBuild
<?,
?>>
downstreamBuilds
=
ImmutableList
.
copyOf
(
build
.
getDownstreamBuilds
(
downstreamProject
));
List
<
AbstractBuild
<?,
?>>
downstreamBuilds
=
ImmutableList
.
copyOf
(
build
.
getDownstreamBuilds
(
downstreamProject
));
assertThat
(
downstreamBuilds
,
hasSize
(
1
));
assertThat
(
downstreamBuilds
,
hasSize
(
numberOfDownstreamBuilds
));
}
}
...
@@ -169,7 +181,7 @@ public class AggregatedTestResultPublisherTest {
...
@@ -169,7 +181,7 @@ public class AggregatedTestResultPublisherTest {
private
void
addFingerprinterToProject
(
FreeStyleProject
project
,
String
[]
contents
,
String
[]
files
)
throws
Exception
{
private
void
addFingerprinterToProject
(
FreeStyleProject
project
,
String
[]
contents
,
String
[]
files
)
throws
Exception
{
StringBuilder
targets
=
new
StringBuilder
();
StringBuilder
targets
=
new
StringBuilder
();
for
(
int
i
=
0
;
i
<
contents
.
length
;
i
++)
{
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
(
','
);
targets
.
append
(
files
[
i
]).
append
(
','
);
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录