Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
易企天创
zentaoatf
提交
6dce10bd
Z
zentaoatf
项目概览
易企天创
/
zentaoatf
9 个月 前同步成功
通知
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 搜索 >>
提交
6dce10bd
编写于
7月 12, 2022
作者:
Z
zhaoke
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'morden-ui' of github.com:easysoft/zentaoatf into morden-ui
上级
86e6563f
5cf8f794
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
37 addition
and
16 deletion
+37
-16
cmd/command/main.go
cmd/command/main.go
+12
-11
internal/command/action/ztfResult.go
internal/command/action/ztfResult.go
+8
-1
internal/pkg/domain/testing.go
internal/pkg/domain/testing.go
+2
-0
internal/pkg/helper/exec/report-unit.go
internal/pkg/helper/exec/report-unit.go
+1
-0
internal/server/modules/v1/domain/webscoket.go
internal/server/modules/v1/domain/webscoket.go
+2
-0
internal/server/modules/v1/domain/zentao.go
internal/server/modules/v1/domain/zentao.go
+1
-1
internal/server/modules/v1/service/test-result.go
internal/server/modules/v1/service/test-result.go
+1
-0
ui/src/locales/en-US.ts
ui/src/locales/en-US.ts
+2
-0
ui/src/locales/zh-CN.ts
ui/src/locales/zh-CN.ts
+1
-0
ui/src/views/exec/LogList.vue
ui/src/views/exec/LogList.vue
+1
-1
ui/src/views/exec/TabPageExecUnit.vue
ui/src/views/exec/TabPageExecUnit.vue
+4
-0
ui/src/views/result/FormResult.vue
ui/src/views/result/FormResult.vue
+2
-2
未找到文件。
cmd/command/main.go
浏览文件 @
6dce10bd
...
...
@@ -22,10 +22,11 @@ var (
independentFile
bool
keywords
string
productId
string
moduleId
string
taskId
string
suiteId
string
productId
string
moduleId
string
taskIdOrName
string
suiteId
string
taskName
string
noNeedConfirm
bool
...
...
@@ -52,8 +53,8 @@ func main() {
flagSet
.
StringVar
(
&
suiteId
,
"s"
,
""
,
""
)
flagSet
.
StringVar
(
&
suiteId
,
"suite"
,
""
,
""
)
flagSet
.
StringVar
(
&
taskId
,
"t"
,
""
,
""
)
flagSet
.
StringVar
(
&
taskId
,
"task"
,
""
,
""
)
flagSet
.
StringVar
(
&
taskId
OrName
,
"t"
,
""
,
""
)
flagSet
.
StringVar
(
&
taskId
OrName
,
"task"
,
""
,
""
)
flagSet
.
StringVar
(
&
language
,
"l"
,
""
,
""
)
flagSet
.
StringVar
(
&
language
,
"language"
,
""
,
""
)
...
...
@@ -96,7 +97,7 @@ func main() {
case
"checkout"
,
"co"
:
if
err
:=
flagSet
.
Parse
(
os
.
Args
[
2
:
]);
err
==
nil
{
action
.
Checkout
(
productId
,
moduleId
,
suiteId
,
taskId
,
independentFile
,
language
)
action
.
Checkout
(
productId
,
moduleId
,
suiteId
,
taskId
OrName
,
independentFile
,
language
)
}
case
"ci"
:
...
...
@@ -108,8 +109,8 @@ func main() {
case
"cr"
:
files
:=
fileUtils
.
GetFilesFromParams
(
os
.
Args
[
2
:
])
if
err
:=
flagSet
.
Parse
(
os
.
Args
[
len
(
files
)
+
2
:
]);
err
==
nil
{
action
.
CommitZTFTestResult
(
files
,
stringUtils
.
ParseInt
(
productId
),
stringUtils
.
ParseInt
(
taskId
),
noNeedConfirm
)
action
.
CommitZTFTestResult
(
files
,
stringUtils
.
ParseInt
(
productId
),
taskIdOrName
,
noNeedConfirm
)
}
case
"cb"
:
...
...
@@ -166,7 +167,7 @@ func run(args []string) {
if
commConsts
.
AutoCommitResult
&&
productId
!=
""
{
action
.
CommitZTFTestResult
([]
string
{
commConsts
.
ExecLogDir
},
stringUtils
.
ParseInt
(
productId
),
stringUtils
.
ParseInt
(
productId
)
,
true
)
stringUtils
.
ParseInt
(
productId
),
taskIdOrName
,
true
)
}
if
commConsts
.
AutoCommitBug
&&
productId
!=
""
{
...
...
@@ -198,7 +199,7 @@ func runFuncTest(args []string) {
msgStr
:=
i118Utils
.
Sprintf
(
"run_with_specific_interpreter"
,
commConsts
.
Interpreter
)
logUtils
.
ExecConsolef
(
color
.
FgCyan
,
msgStr
)
}
action
.
RunZTFTest
(
files
,
moduleId
,
suiteId
,
taskId
)
action
.
RunZTFTest
(
files
,
moduleId
,
suiteId
,
taskId
OrName
)
}
func
runUnitTest
(
args
[]
string
)
{
...
...
internal/command/action/ztfResult.go
浏览文件 @
6dce10bd
...
...
@@ -12,7 +12,7 @@ import (
"strconv"
)
func
CommitZTFTestResult
(
files
[]
string
,
productId
,
taskId
int
,
noNeedConfirm
bool
)
{
func
CommitZTFTestResult
(
files
[]
string
,
productId
int
,
taskIdOrName
string
,
noNeedConfirm
bool
)
{
var
resultDir
string
if
len
(
files
)
>
0
{
resultDir
=
files
[
0
]
...
...
@@ -26,6 +26,12 @@ func CommitZTFTestResult(files []string, productId, taskId int, noNeedConfirm bo
productId
,
_
=
strconv
.
Atoi
(
productIdStr
)
}
taskName
:=
""
taskId
,
err
:=
strconv
.
Atoi
(
taskIdOrName
)
if
err
!=
nil
{
taskName
=
taskIdOrName
}
if
taskId
==
0
&&
!
noNeedConfirm
{
taskIdStr
:=
stdinUtils
.
GetInput
(
"
\\
d*"
,
""
,
i118Utils
.
Sprintf
(
"pls_enter"
)
+
" "
+
i118Utils
.
Sprintf
(
"task_id"
)
+
...
...
@@ -36,6 +42,7 @@ func CommitZTFTestResult(files []string, productId, taskId int, noNeedConfirm bo
result
:=
serverDomain
.
ZentaoResultSubmitReq
{
ProductId
:
productId
,
TaskId
:
taskId
,
Name
:
taskName
,
Seq
:
resultDir
,
}
...
...
internal/pkg/domain/testing.go
浏览文件 @
6dce10bd
...
...
@@ -146,6 +146,8 @@ type ZentaoBug struct {
}
type
ZtfReport
struct
{
Name
string
`json:"name"`
TestEnv
commConsts
.
OsType
`json:"testEnv,omitempty"`
TestType
commConsts
.
TestType
`json:"testType"`
TestTool
commConsts
.
TestTool
`json:"testTool"`
...
...
internal/pkg/helper/exec/report-unit.go
浏览文件 @
6dce10bd
...
...
@@ -43,6 +43,7 @@ func GenUnitTestReport(req serverDomain.TestSet, startTime, endTime int64,
}
report
=
commDomain
.
ZtfReport
{
Name
:
req
.
Name
,
TestEnv
:
commonUtils
.
GetOs
(),
TestType
:
commConsts
.
TestUnit
,
TestTool
:
req
.
TestTool
,
...
...
internal/server/modules/v1/domain/webscoket.go
浏览文件 @
6dce10bd
...
...
@@ -26,6 +26,8 @@ type WsReq struct {
}
type
TestSet
struct
{
Name
string
`json:"name"`
WorkspaceId
int
`json:"workspaceId"`
WorkspaceType
commConsts
.
TestTool
`json:"workspaceType"`
WorkspacePath
string
`json:"workspacePath"`
...
...
internal/server/modules/v1/domain/zentao.go
浏览文件 @
6dce10bd
...
...
@@ -10,7 +10,7 @@ type ZentaoRespData struct {
}
type
ZentaoResultSubmitReq
struct
{
Title
string
`json:"titl
e"`
Name
string
`json:"nam
e"`
Seq
string
`json:"seq"`
WorkspaceId
int
`json:"workspaceId"`
ProductId
int
`json:"productId"`
...
...
internal/server/modules/v1/service/test-result.go
浏览文件 @
6dce10bd
...
...
@@ -150,6 +150,7 @@ func (s *TestResultService) Submit(result serverDomain.ZentaoResultSubmitReq, si
}
config
:=
configHelper
.
LoadBySite
(
site
)
report
.
Name
=
result
.
Name
err
=
zentaoHelper
.
CommitResult
(
report
,
result
.
ProductId
,
result
.
TaskId
,
config
,
nil
)
return
...
...
ui/src/locales/en-US.ts
浏览文件 @
6dce10bd
...
...
@@ -226,6 +226,8 @@ export default {
'
pls_select_task
'
:
'
Please select task
'
,
'
or_input_task_name
'
:
'
Or input new task name
'
,
'
task_name
'
:
'
Zentao Task Name
'
,
'
pls_select_workspace
'
:
'
Please select workspace.
'
,
'
pls_add_zentao_site
'
:
'
Please add zentao site.
'
,
'
pls_create_workspace
'
:
'
Please create workspace to continue.
'
,
...
...
ui/src/locales/zh-CN.ts
浏览文件 @
6dce10bd
...
...
@@ -237,6 +237,7 @@ export default {
'
pls_select_task
'
:
'
请选择任务
'
,
'
or_input_task_name
'
:
'
或输入新任务标题
'
,
'
task_name
'
:
'
禅道任务标题
'
,
'
pls_select_workspace
'
:
'
请选择导出到的工作目录。
'
,
'
pls_add_zentao_site
'
:
'
初次使用,请点击右上按钮新建禅道站点。
'
,
...
...
ui/src/views/exec/LogList.vue
浏览文件 @
6dce10bd
...
...
@@ -168,7 +168,7 @@ const exec = (data: any) => {
msg
=
{
act
:
'
execCase
'
,
testSets
:
sets
}
}
else
if
(
execType
===
'
unit
'
)
{
const
set
=
{
workspaceId
:
data
.
id
,
workspaceType
:
data
.
type
,
cmd
:
data
.
cmd
,
submitResult
:
data
.
submitResult
}
const
set
=
{
workspaceId
:
data
.
id
,
workspaceType
:
data
.
type
,
cmd
:
data
.
cmd
,
submitResult
:
data
.
submitResult
,
name
:
data
.
name
}
msg
=
{
act
:
'
execUnit
'
,
testSets
:
[
set
]}
...
...
ui/src/views/exec/TabPageExecUnit.vue
浏览文件 @
6dce10bd
...
...
@@ -9,6 +9,10 @@
<input
v-model=
"modelRef.submitResult"
type=
"checkbox"
>
</FormItem>
<FormItem
labelWidth=
"100px"
v-if=
"modelRef.submitResult"
name=
"name"
:label=
"t('task_name')"
>
<input
v-model=
"modelRef.name"
>
</FormItem>
<FormItem
labelWidth=
"100px"
>
<Button
:disabled=
"isRunning === 'true' || !modelRef.cmd"
@
click=
"start"
class=
"rounded primary"
>
{{
t
(
'
exec
'
)
}}
...
...
ui/src/views/result/FormResult.vue
浏览文件 @
6dce10bd
...
...
@@ -18,8 +18,8 @@
</div>
</FormItem>
<FormItem
v-if=
"!modelRef.taskId"
name=
"
titl
e"
:label=
"t('or_input_task_name')"
labelWidth=
"120px"
>
<input
type=
"text"
v-model=
"modelRef.
titl
e"
/>
<FormItem
v-if=
"!modelRef.taskId"
name=
"
nam
e"
:label=
"t('or_input_task_name')"
labelWidth=
"120px"
>
<input
type=
"text"
v-model=
"modelRef.
nam
e"
/>
</FormItem>
</Form>
</ZModal>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录