Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
kt-keystone
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
kt-keystone
Commits
c5085307
提交
c5085307
authored
3月 16, 2022
作者:
mry
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat(base): 新增了job接口测试
上级
463e0ba2
隐藏空白字符变更
内嵌
并排
正在显示
12 个修改的文件
包含
369 行增加
和
31 行删除
+369
-31
DataBean.java
.../src/main/java/org/matrix/testNg/web/entity/DataBean.java
+0
-15
DataBeanMove.java
.../main/java/org/matrix/testNg/web/entity/DataBeanMove.java
+29
-0
DataBeansJobVo.java
...ain/java/org/matrix/testNg/web/entity/DataBeansJobVo.java
+5
-1
DataBeansVo.java
...c/main/java/org/matrix/testNg/web/entity/DataBeansVo.java
+5
-0
GenerateReporter.java
...n/java/org/matrix/testNg/web/report/GenerateReporter.java
+4
-1
GenerateReporterJob.java
...ava/org/matrix/testNg/web/report/GenerateReporterJob.java
+76
-0
ReporterData.java
.../main/java/org/matrix/testNg/web/report/ReporterData.java
+8
-0
ReporterDataJob.java
...in/java/org/matrix/testNg/web/report/ReporterDataJob.java
+53
-0
TestNgImpl.java
...rc/main/java/org/matrix/testNg/web/report/TestNgImpl.java
+13
-2
ReporterUtils.java
kt-base/src/main/java/org/matrix/util/ReporterUtils.java
+3
-1
overview.ftl
kt-base/src/main/resources/templates/overview.ftl
+16
-11
overviews.ftl
kt-base/src/main/resources/templates/overviews.ftl
+157
-0
没有找到文件。
kt-base/src/main/java/org/matrix/testNg/web/entity/DataBean.java
浏览文件 @
c5085307
...
@@ -39,19 +39,4 @@ public class DataBean {
...
@@ -39,19 +39,4 @@ public class DataBean {
*/
*/
private
Integer
probability
;
private
Integer
probability
;
/**
* 前置行动ID组,例如:1,2,3
*/
private
String
moveBefore
;
/**
* 后置行动ID组,例如:1,2,3
*/
private
String
moveAfterCase
;
/**
* 测试执行后行动ID组,例如:1,2,3
*/
private
String
moveAfterTest
;
}
}
kt-base/src/main/java/org/matrix/testNg/web/entity/DataBeanMove.java
0 → 100644
浏览文件 @
c5085307
package
org
.
matrix
.
testNg
.
web
.
entity
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
/**
* @author MRY
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public
class
DataBeanMove
{
/**
* 前置行动ID组,例如:1,2,3
*/
private
String
moveBefore
;
/**
* 后置行动ID组,例如:1,2,3
*/
private
String
moveAfterCase
;
/**
* 测试执行后行动ID组,例如:1,2,3
*/
private
String
moveAfterTest
;
}
kt-base/src/main/java/org/matrix/testNg/web/entity/DataBeansJobVo.java
浏览文件 @
c5085307
...
@@ -14,5 +14,9 @@ import java.util.List;
...
@@ -14,5 +14,9 @@ import java.util.List;
@NoArgsConstructor
@NoArgsConstructor
public
class
DataBeansJobVo
{
public
class
DataBeansJobVo
{
private
List
<
DataBeansVo
>
dataBeansVoList
;
private
DataBean
dataBean
;
private
List
<
DataBeanMove
>
dataBeanMoveList
;
private
List
<
DataBeans
>
dataBeansList
;
}
}
kt-base/src/main/java/org/matrix/testNg/web/entity/DataBeansVo.java
浏览文件 @
c5085307
...
@@ -21,6 +21,11 @@ public class DataBeansVo {
...
@@ -21,6 +21,11 @@ public class DataBeansVo {
*/
*/
private
DataBean
dataBean
;
private
DataBean
dataBean
;
/**
* 动作部分
*/
private
DataBeanMove
dataBeanMove
;
/**
/**
* 细节部分
* 细节部分
*/
*/
...
...
kt-base/src/main/java/org/matrix/testNg/web/report/GenerateReporter.java
浏览文件 @
c5085307
...
@@ -5,6 +5,7 @@ import freemarker.template.Template;
...
@@ -5,6 +5,7 @@ import freemarker.template.Template;
import
freemarker.template.TemplateExceptionHandler
;
import
freemarker.template.TemplateExceptionHandler
;
import
org.matrix.exception.GlobalException
;
import
org.matrix.exception.GlobalException
;
import
org.matrix.testNg.web.entity.DataBean
;
import
org.matrix.testNg.web.entity.DataBean
;
import
org.matrix.testNg.web.entity.DataBeanMove
;
import
org.matrix.testNg.web.entity.DataBeans
;
import
org.matrix.testNg.web.entity.DataBeans
;
import
org.matrix.testNg.web.entity.ReportMessage
;
import
org.matrix.testNg.web.entity.ReportMessage
;
import
org.matrix.util.ReporterUtils
;
import
org.matrix.util.ReporterUtils
;
...
@@ -34,14 +35,16 @@ public class GenerateReporter {
...
@@ -34,14 +35,16 @@ public class GenerateReporter {
cfg
.
setClassForTemplateLoading
(
this
.
getClass
(),
"/templates"
);
cfg
.
setClassForTemplateLoading
(
this
.
getClass
(),
"/templates"
);
cfg
.
setDefaultEncoding
(
"UTF-8"
);
cfg
.
setDefaultEncoding
(
"UTF-8"
);
cfg
.
setTemplateExceptionHandler
(
TemplateExceptionHandler
.
RETHROW_HANDLER
);
cfg
.
setTemplateExceptionHandler
(
TemplateExceptionHandler
.
RETHROW_HANDLER
);
Template
temp
=
cfg
.
getTemplate
(
"overview
Beautiful
.ftl"
);
Template
temp
=
cfg
.
getTemplate
(
"overview.ftl"
);
Map
context
=
new
HashMap
();
Map
context
=
new
HashMap
();
ReporterData
reporterData
=
new
ReporterData
();
ReporterData
reporterData
=
new
ReporterData
();
DataBean
dataBean
=
reporterData
.
testDataBean
();
DataBean
dataBean
=
reporterData
.
testDataBean
();
DataBeanMove
dataBeanMove
=
reporterData
.
testDataBeanMove
();
List
<
DataBeans
>
dataBeansList
=
reporterData
.
testDataBeans
();
List
<
DataBeans
>
dataBeansList
=
reporterData
.
testDataBeans
();
// 这里是公共的信息.
// 这里是公共的信息.
for
(
DataBeans
bean
:
dataBeansList
)
{
for
(
DataBeans
bean
:
dataBeansList
)
{
context
.
put
(
"overView"
,
dataBean
);
context
.
put
(
"overView"
,
dataBean
);
context
.
put
(
"move"
,
dataBeanMove
);
if
(
bean
.
getResult
())
{
if
(
bean
.
getResult
())
{
context
.
put
(
"pass"
,
bean
);
context
.
put
(
"pass"
,
bean
);
}
else
{
}
else
{
...
...
kt-base/src/main/java/org/matrix/testNg/web/report/GenerateReporterJob.java
0 → 100644
浏览文件 @
c5085307
package
org
.
matrix
.
testNg
.
web
.
report
;
import
freemarker.template.Configuration
;
import
freemarker.template.Template
;
import
freemarker.template.TemplateExceptionHandler
;
import
org.matrix.exception.GlobalException
;
import
org.matrix.testNg.web.entity.DataBean
;
import
org.matrix.testNg.web.entity.DataBeanMove
;
import
org.matrix.testNg.web.entity.DataBeans
;
import
org.matrix.testNg.web.entity.ReportMessage
;
import
org.matrix.util.ReporterUtils
;
import
java.io.*
;
import
java.nio.charset.StandardCharsets
;
import
java.time.LocalDateTime
;
import
java.time.format.DateTimeFormatter
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* @author MRY
*/
public
class
GenerateReporterJob
{
private
static
final
LocalDateTime
TIME
=
LocalDateTime
.
now
();
private
static
final
DateTimeFormatter
DATE_TIME_FORMATTER
=
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd-HH-mm-ss"
);
private
static
final
String
STRING
=
DATE_TIME_FORMATTER
.
format
(
TIME
);
private
static
final
String
OUTPUT_FOLDER
=
System
.
getProperty
(
"user.dir"
)
+
"/"
;
private
static
final
String
FILE_NAME
=
STRING
+
"-testNg.html"
;
public
ReportMessage
generateReport
()
{
try
{
Configuration
cfg
=
new
Configuration
(
Configuration
.
VERSION_2_3_28
);
cfg
.
setClassForTemplateLoading
(
this
.
getClass
(),
"/templates"
);
cfg
.
setDefaultEncoding
(
"UTF-8"
);
cfg
.
setTemplateExceptionHandler
(
TemplateExceptionHandler
.
RETHROW_HANDLER
);
Template
temp
=
cfg
.
getTemplate
(
"overviews.ftl"
);
Map
context
=
new
HashMap
();
ReporterDataJob
reporterDatajob
=
new
ReporterDataJob
();
DataBean
dataBean
=
reporterDatajob
.
testDataBean
();
List
<
DataBeanMove
>
dataBeanMoves
=
reporterDatajob
.
testDataBeanMove
();
List
<
DataBeans
>
dataBeansList
=
reporterDatajob
.
testDataBeans
();
// 这里是公共的信息.
for
(
DataBeans
bean
:
dataBeansList
)
{
context
.
put
(
"overView"
,
dataBean
);
for
(
DataBeanMove
dataBeanMove
:
dataBeanMoves
)
{
context
.
put
(
"move"
,
dataBeanMove
);
if
(
bean
.
getResult
())
{
context
.
put
(
"pass"
,
bean
);
}
else
{
context
.
put
(
"fail"
,
bean
);
}
}
}
//文件夹不存在的话进行创建
File
reportDir
=
new
File
(
OUTPUT_FOLDER
);
if
(!
reportDir
.
exists
()
&&
!
reportDir
.
isDirectory
())
{
reportDir
.
mkdir
();
}
// 输出流
FileOutputStream
out
=
new
FileOutputStream
(
OUTPUT_FOLDER
+
"/"
+
FILE_NAME
);
Writer
writer
=
new
BufferedWriter
(
new
OutputStreamWriter
(
out
,
StandardCharsets
.
UTF_8
));
// 转换输出
temp
.
process
(
context
,
writer
);
writer
.
flush
();
ReportMessage
reportMessage
=
new
ReportMessage
();
reportMessage
.
setUrl
(
OUTPUT_FOLDER
+
"/"
+
FILE_NAME
);
return
reportMessage
;
}
catch
(
Exception
e
)
{
throw
new
GlobalException
(
e
.
getMessage
());
}
finally
{
ReporterUtils
.
map
=
new
HashMap
<>();
}
}
}
kt-base/src/main/java/org/matrix/testNg/web/report/ReporterData.java
浏览文件 @
c5085307
package
org
.
matrix
.
testNg
.
web
.
report
;
package
org
.
matrix
.
testNg
.
web
.
report
;
import
org.matrix.testNg.web.entity.DataBean
;
import
org.matrix.testNg.web.entity.DataBean
;
import
org.matrix.testNg.web.entity.DataBeanMove
;
import
org.matrix.testNg.web.entity.DataBeans
;
import
org.matrix.testNg.web.entity.DataBeans
;
import
org.matrix.testNg.web.entity.DataBeansVo
;
import
org.matrix.testNg.web.entity.DataBeansVo
;
import
org.matrix.util.ReporterUtils
;
import
org.matrix.util.ReporterUtils
;
...
@@ -43,6 +44,13 @@ public class ReporterData {
...
@@ -43,6 +44,13 @@ public class ReporterData {
return
dataBean
;
return
dataBean
;
}
}
/**
* 动作部分
*/
public
DataBeanMove
testDataBeanMove
()
{
return
ReporterUtils
.
map
.
get
(
"dataBeansVo"
).
getDataBeanMove
();
}
/**
/**
* 模板的细节部分
* 模板的细节部分
*
*
...
...
kt-base/src/main/java/org/matrix/testNg/web/report/ReporterDataJob.java
浏览文件 @
c5085307
package
org
.
matrix
.
testNg
.
web
.
report
;
package
org
.
matrix
.
testNg
.
web
.
report
;
import
org.matrix.testNg.web.entity.DataBean
;
import
org.matrix.testNg.web.entity.DataBeanMove
;
import
org.matrix.testNg.web.entity.DataBeans
;
import
org.matrix.testNg.web.entity.DataBeansJobVo
;
import
org.matrix.util.ReporterUtils
;
import
java.util.List
;
/**
/**
* @author MRY
* @author MRY
*/
*/
public
class
ReporterDataJob
{
public
class
ReporterDataJob
{
/**
* 模板公共部分
*
* @return 补全了的所有报告信息
*/
public
DataBean
testDataBean
()
{
DataBeansJobVo
dataBeansJobVo
=
ReporterUtils
.
jobMap
.
get
(
"dataBeansJobVo"
);
int
passNum
=
0
;
int
failNum
=
0
;
// 测试结果汇总数据
DataBean
dataBean
=
dataBeansJobVo
.
getDataBean
();
List
<
DataBeans
>
dataBeanLists
=
dataBeansJobVo
.
getDataBeansList
();
for
(
DataBeans
dataBeanList
:
dataBeanLists
)
{
if
(
dataBeanList
.
getResult
())
{
passNum
+=
1
;
}
else
{
failNum
+=
1
;
}
}
//成功
dataBean
.
setPassNum
(
passNum
);
//失败
dataBean
.
setFailNum
(
failNum
);
//总数
dataBean
.
setTotal
(
passNum
+
failNum
);
//通过率
dataBean
.
setProbability
(
passNum
/
(
passNum
+
failNum
));
// TODO 时间需要处理
return
dataBean
;
}
/**
* 动作部分
*/
public
List
<
DataBeanMove
>
testDataBeanMove
()
{
return
ReporterUtils
.
jobMap
.
get
(
"dataBeansJobVo"
).
getDataBeanMoveList
();
}
/**
* 模板的细节部分
*
* @return 报告中细节部分的信息
*/
public
List
<
DataBeans
>
testDataBeans
()
{
return
ReporterUtils
.
jobMap
.
get
(
"dataBeansJobVo"
).
getDataBeansList
();
}
}
}
kt-base/src/main/java/org/matrix/testNg/web/report/TestNgImpl.java
浏览文件 @
c5085307
package
org
.
matrix
.
testNg
.
web
.
report
;
package
org
.
matrix
.
testNg
.
web
.
report
;
import
org.matrix.testNg.web.TestNg
;
import
org.matrix.testNg.web.TestNg
;
import
org.matrix.testNg.web.entity.DataBeansJobVo
;
import
org.matrix.testNg.web.entity.DataBeansVo
;
import
org.matrix.testNg.web.entity.DataBeansVo
;
import
org.matrix.testNg.web.entity.ReportMessage
;
import
org.matrix.testNg.web.entity.ReportMessage
;
import
org.matrix.util.ReporterUtils
;
import
org.matrix.util.ReporterUtils
;
...
@@ -13,15 +14,25 @@ import org.springframework.stereotype.Component;
...
@@ -13,15 +14,25 @@ import org.springframework.stereotype.Component;
public
class
TestNgImpl
implements
TestNg
{
public
class
TestNgImpl
implements
TestNg
{
/**
/**
* 报告生成的位置
*
单挑用例执行时,
报告生成的位置
*
*
* @param dataBeansVo 报告中需要的信息
* @param dataBeansVo 报告中需要的信息
* @return 报告位置信息
* @return 报告位置信息
*/
*/
public
ReportMessage
getReportUrl
(
DataBeansVo
dataBeansVo
)
{
public
ReportMessage
getReportUrl
(
DataBeansVo
dataBeansVo
)
{
ReporterUtils
.
map
.
put
(
"dataBeansVo"
,
dataBeansVo
);
ReporterUtils
.
map
.
put
(
"dataBeansVo"
,
dataBeansVo
);
GenerateReporter
generateReporter
=
new
GenerateReporter
();
GenerateReporter
generateReporter
=
new
GenerateReporter
();
ReportMessage
reportMessage
=
generateReporter
.
generateReport
();
ReportMessage
reportMessage
=
generateReporter
.
generateReport
();
return
reportMessage
;
return
reportMessage
;
}
}
/**
* 多条用例执行时,报告生成的位置
*/
public
ReportMessage
getReporterUrls
(
DataBeansJobVo
dataBeansJobVo
)
{
ReporterUtils
.
jobMap
.
put
(
"dataBeansJobVo"
,
dataBeansJobVo
);
GenerateReporterJob
generateReporterJob
=
new
GenerateReporterJob
();
ReportMessage
reportMessage
=
generateReporterJob
.
generateReport
();
return
reportMessage
;
}
}
}
kt-base/src/main/java/org/matrix/util/ReporterUtils.java
浏览文件 @
c5085307
package
org
.
matrix
.
util
;
package
org
.
matrix
.
util
;
import
org.matrix.actuators.usecase.TestCaseExecuteResult
;
import
org.matrix.actuators.usecase.TestCaseExecuteResult
;
import
org.matrix.testNg.web.entity.DataBeansJobVo
;
import
org.matrix.testNg.web.entity.DataBeansVo
;
import
org.matrix.testNg.web.entity.DataBeansVo
;
import
java.util.HashMap
;
import
java.util.HashMap
;
...
@@ -18,5 +19,6 @@ public class ReporterUtils {
...
@@ -18,5 +19,6 @@ public class ReporterUtils {
public
static
Map
<
String
,
DataBeansVo
>
map
=
new
HashMap
<>();
public
static
Map
<
String
,
DataBeansVo
>
map
=
new
HashMap
<>();
public
static
Map
<
String
,
String
>
mapUrl
=
new
HashMap
<>();
public
static
Map
<
String
,
DataBeansJobVo
>
jobMap
=
new
HashMap
<>();
}
}
kt-base/src/main/resources/templates/overview.ftl
浏览文件 @
c5085307
...
@@ -98,6 +98,19 @@
...
@@ -98,6 +98,19 @@
</tr>
</tr>
</table>
</table>
<br/><br/>
<br/><br/>
<table
id=
"moveAction"
class=
"tabNoBorder"
>
<tr
class=
"columnHeadings"
>
<th>
前置动作
</th>
<th>
中置动作
</th>
<th>
后置动作
</th>
</tr>
<tr>
<td>
${move.moveBefore}
</td>
<
#--用例总数-->
<td>
${move.moveAfterCase}
</td>
<
#--未执行用例数-->
<td>
${move.moveAfterTest}
</td>
<
#--执行通过-->
</tr>
</table>
<br/><br/>
<h2>
Detail
</h2>
<h2>
Detail
</h2>
<table
class=
"tabNoBorder"
>
<table
class=
"tabNoBorder"
>
<tr
class=
"columnHeadings"
>
<tr
class=
"columnHeadings"
>
...
@@ -125,15 +138,9 @@
...
@@ -125,15 +138,9 @@
<td>
${failCase.moveAfterCase!}
</td>
<
#--中间动作-->
<td>
${failCase.moveAfterCase!}
</td>
<
#--中间动作-->
<td>
${failCase.moveAfterTest!}
</td>
<
#--后置动作-->
<td>
${failCase.moveAfterTest!}
</td>
<
#--后置动作-->
<td>
${failCase.description!}
</td>
<
#--用例描述-->
<td>
${failCase.description!}
</td>
<
#--用例描述-->
<td>
<td>
${failCase.result}
</td>
<div
class=
"failBtn"
>
失败
</div>
<
#--
<th>
执行结果
</th>
-->
</td>
<td>
${failCase.duration!}
</td>
<
#--
<th>
执行时间(s)
</th>
-->
<td>
${failCase.duration!}
</td>
<
#--
<th>
执行时间(s)
</th>
-->
<td>
<td>
${failCase.resultMessage!}
</td>
${failCase.throwable!}
</br>
<
#--
<th>
结果信息
</th>
-->
${failCase.resultMessage!}
</td>
</tr>
</tr>
<
/#list>
<
/#list>
<
#list pass as passCase>
<
#list pass as passCase>
...
@@ -147,9 +154,7 @@
...
@@ -147,9 +154,7 @@
<td>
${passCase.moveAfterCase!}
</td>
<
#--中间动作-->
<td>
${passCase.moveAfterCase!}
</td>
<
#--中间动作-->
<td>
${passCase.moveAfterTest!}
</td>
<
#--后置动作-->
<td>
${passCase.moveAfterTest!}
</td>
<
#--后置动作-->
<td>
${passCase.description}
</td>
<
#--用例描述-->
<td>
${passCase.description}
</td>
<
#--用例描述-->
<td>
<td>
${passCase.result}
</td>
<div
class=
"successBtn"
>
成功
</div>
<
#--执行结果-->
</td>
<td>
${passCase.duration!}
</td>
<
#--执行时间(s)-->
<td>
${passCase.duration!}
</td>
<
#--执行时间(s)-->
<td>
${passCase.resultMessage!}
</td>
<
#--结果信息-->
<td>
${passCase.resultMessage!}
</td>
<
#--结果信息-->
</tr>
</tr>
...
...
kt-base/src/main/resources/templates/overviews.ftl
0 → 100644
浏览文件 @
c5085307
<?xml version="1.0" encoding="utf-8" ?>
<head>
<title>
test
</title>
<meta
http-equiv=
"Content-Type"
content=
"text/html;charset=utf-8"
/>
<meta
name=
"description"
content=
"TestNG unit test results."
/>
<style
type=
"text/css"
>
body {
margin: 10px 20px;
font-size: 14px;
font-family: "Arial", "Microsoft YaHei", "黑体", "宋体", sans-serif;
}
.successBtn {
width: 60px;
padding: 3px;
background-color: #58ab48;
border-color: #58ab48;
color: #fff;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
border-radius: 10px;
-khtml-border-radius: 10px;
text-align: center;
vertical-align: middle;
border: 1px solid transparent;
font-weight: 500;
}
.failBtn {
width: 60px;
padding: 3px;
background-color: #ab2e2d;
border-color: #ab2e2d;
color: #fff;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
border-radius: 10px; /* future proofing */
-khtml-border-radius: 10px; /* for old Konqueror browsers */
text-align: center;
vertical-align: middle;
border: 1px solid transparent;
font-weight: 500;
}
</style>
<style>
/* Border styles */
.tabNoBorder thead, .tabNoBorder tr {
border-top-width: 1px;
border-top-style: solid;
border-top-color: rgb(211, 202, 221);
}
.tabNoBorder {
border-bottom-width: 1px;
border-bottom-style: solid;
border-bottom-color: rgb(211, 202, 221);
}
/* Padding and font style */
.tabNoBorder td, .tabNoBorder th {
padding: 5px 10px;
font-size: 14px;
font-family: Verdana;
color: rgb(95, 74, 121);
}
/* Alternating background colors */
.tabNoBorder tr:nth-child(even) {
background: rgb(223, 216, 232)
}
.tabNoBorder tr:nth-child(odd) {
background: #FFF
}
</style>
</head>
<body>
<br/>
<h2>
Summary
</h2>
<table
id=
"summary"
class=
"tabNoBorder"
>
<tr
class=
"columnHeadings"
>
<th>
用例总数
</th>
<th>
未执行用例数
</th>
<th>
执行通过
</th>
<th>
执行失败
</th>
<th>
跳过用例数
</th>
<th>
执行时间(s)
</th>
<th>
用例通过率
</th>
</tr>
<tr>
<td>
${overView.allTestsSize}
</td>
<
#--用例总数-->
<td>
${overView.excludeTestsSize}
</td>
<
#--未执行用例数-->
<td>
${overView.passedTestsSize}
</td>
<
#--执行通过-->
<td>
${overView.failedTestsSize}
</td>
<
#--执行失败-->
<td>
${overView.skippedTestsSize}
</td>
<
#--跳过用例数-->
<td>
${overView.testsTime}
</td>
<
#--执行时间(s)-->
<td>
${overView.passPercent}
</td>
<
#--用例通过率-->
</tr>
</table>
<br/><br/>
<h2>
Detail
</h2>
<table
class=
"tabNoBorder"
>
<tr
class=
"columnHeadings"
>
<th>
前置动作
</th>
<th>
中置动作
</th>
<th>
后置动作
</th>
</tr>
<
#list move as moveCase>
<tr>
<td>
${moveCase.moveBefore}
</td>
<
#--用例总数-->
<td>
${moveCase.moveAfterCase}
</td>
<
#--未执行用例数-->
<td>
${moveCase.moveAfterTest}
</td>
<
#--执行通过-->
</tr>
<
/#list>
<table
class=
"aaa"
>
<tr
class=
"columnHeadings"
>
<th>
编号
</th>
<th>
用例名称
</th>
<th>
用例类型
</th>
<th>
详细参数
</th>
<th>
用例描述
</th>
<th>
执行结果
</th>
<th>
执行时间(s)
</th>
<th>
结果信息
</th>
</tr>
<
#assign caseNo = 0>
<
#list fail as failCase>
<tr>
<
#assign caseNo=caseNo+1>
<td>
${caseNo}
</td>
<
#--编号-->
<td>
${failCase.testCaseName!}
</td>
<
#--用例名称-->
<td>
${failCase.type!}
</td>
<
#--用例类型-->
<td>
${failCase.detail!}
</td>
<
#--详细参数-->
<td>
${failCase.description!}
</td>
<
#--用例描述-->
<td>
${failCase.result}
</td>
<td>
${failCase.duration!}
</td>
<
#--
<th>
执行时间(s)
</th>
-->
<td>
${failCase.resultMessage!}
</td>
</tr>
<
/#list>
<
#list pass as passCase>
<tr>
<
#assign caseNo=caseNo+1>
<td>
${caseNo}
</td>
<
#--编号-->
<td>
${passCase.testCaseName!}
</td>
<
#--用例名称-->
<td>
${passCase.type!}
</td>
<
#--用例类型-->
<td>
${passCase.detail!}
</td>
<
#--详细参数-->
<td>
${passCase.description}
</td>
<
#--用例描述-->
<td>
${passCase.result}
</td>
<td>
${passCase.duration!}
</td>
<
#--执行时间(s)-->
<td>
${passCase.resultMessage!}
</td>
<
#--结果信息-->
</tr>
<
/#list>
</table>
</table>
</body>
</html>
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论