Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
易企天创
zentaoatf
提交
e7ab03b9
Z
zentaoatf
项目概览
易企天创
/
zentaoatf
11 个月 前同步成功
通知
11
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
3
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Z
zentaoatf
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
3
Issue
3
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
e7ab03b9
编写于
8月 31, 2019
作者:
aaronchen2k2k
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
config log for screen, result and trace levels
上级
af9157ee
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
8 addition
and
9 deletion
+8
-9
src/service/testing/check.go
src/service/testing/check.go
+1
-1
src/service/testing/report.go
src/service/testing/report.go
+7
-8
未找到文件。
src/service/testing/check.go
浏览文件 @
e7ab03b9
...
...
@@ -52,7 +52,7 @@ func ValidateCaseResult(scriptFile string, langType string,
stepId
,
_
:=
strconv
.
Atoi
(
str
)
stepResult
,
checkpointLogs
:=
ValidateStepResult
(
langType
,
expectLines
,
actualLines
)
stepLog
:=
model
.
StepLog
{
Id
:
stepId
,
Name
:
step
,
Status
:
stepResult
,
CheckPoints
:
checkpointLogs
}
stepLog
:=
model
.
StepLog
{
Id
:
stepId
,
Name
:
arr
[
1
]
,
Status
:
stepResult
,
CheckPoints
:
checkpointLogs
}
stepLogs
=
append
(
stepLogs
,
stepLog
)
if
!
stepResult
{
caseResult
=
constant
.
FAIL
.
String
()
...
...
src/service/testing/report.go
浏览文件 @
e7ab03b9
...
...
@@ -4,7 +4,6 @@ import (
"encoding/json"
"fmt"
"github.com/easysoft/zentaoatf/src/model"
"github.com/easysoft/zentaoatf/src/utils/common"
constant
"github.com/easysoft/zentaoatf/src/utils/const"
"github.com/easysoft/zentaoatf/src/utils/file"
i118Utils
"github.com/easysoft/zentaoatf/src/utils/i118"
...
...
@@ -29,7 +28,7 @@ func Print(report model.TestReport) {
logUtils
.
PrintAndLogColorLn
(
fmt
.
Sprintf
(
" %s: %d"
,
i118Utils
.
I118Prt
.
Sprintf
(
"skip"
),
report
.
Skip
),
color
.
FgYellow
)
for
_
,
cs
:=
range
report
.
Cases
{
str
:=
"
\n
%d. %s %s, %s"
str
:=
"
\n
%d. %s %s, %s"
status
:=
cs
.
Status
statusColor
:=
logUtils
.
ColoredStatus
(
status
)
...
...
@@ -43,12 +42,12 @@ func Print(report model.TestReport) {
logUtils
.
PrintAndLog
(
""
)
}
str
:=
"
%s: %s
"
status
:=
commonUtils
.
BoolToPass
(
step
.
Status
)
statusColor
:=
logUtils
.
ColoredStatus
(
status
)
str
:=
"
[Step%d]: %s
\n
"
//
status := commonUtils.BoolToPass(step.Status)
//
statusColor := logUtils.ColoredStatus(status)
//logs = append(logs, fmt.Sprintf(str, status, step.Name))
logUtils
.
PrintTo
(
fmt
.
Sprintf
(
str
,
st
atusColor
,
step
.
Name
+
"
\n
"
))
logUtils
.
PrintTo
(
fmt
.
Sprintf
(
str
,
st
ep
.
Id
,
step
.
Name
))
count1
:=
0
for
_
,
cp
:=
range
step
.
CheckPoints
{
...
...
@@ -62,8 +61,8 @@ func Print(report model.TestReport) {
// i118Utils.I118Prt.Sprintf("checkpoint"), cp.Numb))
//logUtils.PrintTo(fmt.Sprintf(" %s: %s %d\n", cpStatusColored, i118Utils.I118Prt.Sprintf("checkpoint"), cp.Numb))
logUtils
.
PrintAndLog
(
fmt
.
Sprintf
(
"
%s %s"
,
i118Utils
.
I118Prt
.
Sprintf
(
"expect_result"
)
,
cp
.
Expect
))
logUtils
.
PrintAndLog
(
fmt
.
Sprintf
(
"
%s %s"
,
i118Utils
.
I118Prt
.
Sprintf
(
"actual_result"
)
,
cp
.
Actual
))
logUtils
.
PrintAndLog
(
fmt
.
Sprintf
(
"
[Expect] %s"
,
cp
.
Expect
))
logUtils
.
PrintAndLog
(
fmt
.
Sprintf
(
"
[Actual] %s"
,
cp
.
Actual
))
count1
++
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录