Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
易企天创
zentaoatf
提交
7ec7db4d
Z
zentaoatf
项目概览
易企天创
/
zentaoatf
10 个月 前同步成功
通知
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 搜索 >>
提交
7ec7db4d
编写于
9月 03, 2019
作者:
aaronchen2k2k
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
code refactoring for exe logic
上级
ff7d5381
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
73 addition
and
42 deletion
+73
-42
res/messages_en.json
res/messages_en.json
+22
-7
res/messages_zh.json
res/messages_zh.json
+21
-4
src/service/zentao/testcase.go
src/service/zentao/testcase.go
+1
-1
src/utils/stdin/stdin.go
src/utils/stdin/stdin.go
+29
-27
src/utils/zentao/zentao.go
src/utils/zentao/zentao.go
+0
-3
未找到文件。
res/messages_en.json
浏览文件 @
7ec7db4d
...
...
@@ -78,13 +78,13 @@
},
{
"id"
:
"enter_co_type"
,
"message"
:
"
enter co type
"
,
"translation"
:
"
import test cases from? Product / Module / Suite /
Task"
"message"
:
""
,
"translation"
:
"
Import test cases from?
\n
1. Product
\n
2. Module
\n
3. Suite
\n
4.
Task"
},
{
"id"
:
"enter_co_independent"
,
"message"
:
"enter co independent"
,
"translation"
:
"
save expect results in independent file? Yes / No, default No
"
"translation"
:
"
Save expect results in independent file[y/N]?
"
},
{
"id"
:
"enter_co_language"
,
...
...
@@ -381,15 +381,30 @@
"message"
:
"ZentaoUrl"
,
"translation"
:
"ZentaoUrl"
},
{
"id"
:
"pls_input"
,
"message"
:
""
,
"translation"
:
"Please input"
},
{
"id"
:
"product_id"
,
"message"
:
"ProductId"
,
"translation"
:
"ProductId"
"message"
:
""
,
"translation"
:
"Product Id"
},
{
"id"
:
"module_id"
,
"message"
:
""
,
"translation"
:
"Module Id"
},
{
"id"
:
"suite_id"
,
"message"
:
""
,
"translation"
:
"Suite Id"
},
{
"id"
:
"task_id"
,
"message"
:
"
TaskId
"
,
"translation"
:
"TaskId"
"message"
:
""
,
"translation"
:
"Task
Id"
},
{
"id"
:
"independent_expect_result"
,
...
...
res/messages_zh.json
浏览文件 @
7ec7db4d
...
...
@@ -373,16 +373,33 @@
"message"
:
"ZentaoUrl"
,
"translation"
:
"禅道地址"
},
{
"id"
:
"pls_input"
,
"message"
:
""
,
"translation"
:
"请输入"
},
{
"id"
:
"product_id"
,
"message"
:
"ProductId"
,
"translation"
:
"产品ID"
"message"
:
""
,
"translation"
:
"产品Id"
},
{
"id"
:
"module_id"
,
"message"
:
""
,
"translation"
:
"模块Id"
},
{
"id"
:
"suite_id"
,
"message"
:
""
,
"translation"
:
"套件Id"
},
{
"id"
:
"task_id"
,
"message"
:
"
TaskId
"
,
"translation"
:
"任务I
D
"
"message"
:
""
,
"translation"
:
"任务I
d
"
},
{
"id"
:
"independent_expect_result"
,
"message"
:
"Indep. Result"
,
...
...
src/service/zentao/testcase.go
浏览文件 @
7ec7db4d
...
...
@@ -220,7 +220,7 @@ func CommitCase(caseId int, title string) {
var
yes
bool
logUtils
.
PrintToStdOut
(
"
\n
"
+
i118Utils
.
I118Prt
.
Sprintf
(
"case_update_confirm"
,
title
),
-
1
)
stdinUtils
.
InputForBool
(
&
yes
,
"want_to_continue"
)
stdinUtils
.
InputForBool
(
&
yes
,
true
,
"want_to_continue"
)
if
yes
{
url
:=
config
.
Url
+
uri
...
...
src/utils/stdin/stdin.go
浏览文件 @
7ec7db4d
...
...
@@ -77,50 +77,52 @@ func InputForRequest() {
func
InputForCheckout
(
productId
*
string
,
moduleId
*
string
,
suiteId
*
string
,
taskId
*
string
,
independentFile
*
bool
,
scriptLang
*
string
)
{
coType
:=
getInput
(
"(
product|module|suite|task|p|m|s|t
)"
,
"enter_co_type"
)
coType
:=
getInput
(
"(
1|2|3|4
)"
,
"enter_co_type"
)
coType
=
strings
.
ToLower
(
coType
)
if
coType
==
"product"
||
coType
==
"p"
{
*
productId
=
getInput
(
"
\\
d+"
,
"productId"
)
}
else
if
coType
==
"module"
||
coType
==
"m"
{
*
productId
=
getInput
(
"
\\
d+"
,
"productId"
)
*
moduleId
=
getInput
(
"
\\
d+"
,
"moduleId"
)
}
else
if
coType
==
"suite"
||
coType
==
"s"
{
*
suiteId
=
getInput
(
"
\\
d+"
,
"suiteId"
)
}
else
if
coType
==
"task"
||
coType
==
"t"
{
*
taskId
=
getInput
(
"
\\
d+"
,
"taskId"
)
if
coType
==
"1"
{
*
productId
=
getInput
(
"
\\
d+"
,
i118Utils
.
I118Prt
.
Sprintf
(
"pls_input"
)
+
" "
+
i118Utils
.
I118Prt
.
Sprintf
(
"product_id"
))
}
else
if
coType
==
"2"
{
*
productId
=
getInput
(
"
\\
d+"
,
i118Utils
.
I118Prt
.
Sprintf
(
"pls_input"
)
+
" "
+
i118Utils
.
I118Prt
.
Sprintf
(
"product_id"
))
*
moduleId
=
getInput
(
"
\\
d+"
,
i118Utils
.
I118Prt
.
Sprintf
(
"pls_input"
)
+
" "
+
i118Utils
.
I118Prt
.
Sprintf
(
"module_id"
))
}
else
if
coType
==
"3"
{
*
suiteId
=
getInput
(
"
\\
d+"
,
i118Utils
.
I118Prt
.
Sprintf
(
"pls_input"
)
+
" "
+
i118Utils
.
I118Prt
.
Sprintf
(
"suite_id"
))
}
else
if
coType
==
"4"
{
*
taskId
=
getInput
(
"
\\
d+"
,
i118Utils
.
I118Prt
.
Sprintf
(
"pls_input"
)
+
" "
+
i118Utils
.
I118Prt
.
Sprintf
(
"task_id"
))
}
indep
:=
getInput
(
"(yes|no|y|n|)"
,
"enter_co_independent"
)
indep
=
strings
.
ToLower
(
indep
)
if
indep
==
"yes"
&&
indep
==
"y"
{
*
independentFile
=
true
}
else
{
if
indep
==
""
{
fmt
.
Print
(
"no"
)
}
*
independentFile
=
false
}
InputForBool
(
independentFile
,
false
,
"enter_co_independent"
)
regx
:=
langUtils
.
GetSupportLangageRegx
()
fmtParam
:=
strings
.
Join
(
langUtils
.
GetSupportLangageArr
(),
" / "
)
*
scriptLang
=
getInput
(
regx
,
"enter_co_language"
,
fmtParam
)
configUtils
.
PrintCurrConfig
()
}
func
InputForDir
(
dir
*
string
,
entity
string
)
{
*
dir
=
getInput
(
"is_dir"
,
"enter_dir"
,
i118Utils
.
I118Prt
.
Sprintf
(
entity
))
}
func
InputForInt
(
in
*
string
,
entity
string
)
{
*
in
=
getInput
(
"
\\
d+"
,
"
enter_id"
,
i118Utils
.
I118Prt
.
Sprintf
(
entity
)
)
func
InputForInt
(
in
*
string
,
fmtStr
string
,
fmtParam
...
string
)
{
*
in
=
getInput
(
"
\\
d+"
,
"
fmtStr"
,
fmtParam
)
}
func
InputForBool
(
in
*
bool
,
entity
string
)
{
str
:=
getInput
(
"(yes|no|y|n)"
,
i118Utils
.
I118Prt
.
Sprintf
(
entity
),
""
)
func
InputForBool
(
in
*
bool
,
defaultVal
bool
,
fmtStr
string
,
fmtParam
...
string
)
{
str
:=
getInput
(
"(yes|no|y|n|)"
,
fmtStr
,
fmtParam
)
if
str
==
""
{
*
in
=
defaultVal
return
}
if
str
!=
"n"
&&
str
!=
"no
"
{
if
str
==
"y"
&&
str
!=
"yes
"
{
*
in
=
true
}
else
{
*
in
=
false
...
...
src/utils/zentao/zentao.go
浏览文件 @
7ec7db4d
...
...
@@ -6,7 +6,6 @@ import (
constant
"github.com/easysoft/zentaoatf/src/utils/const"
dateUtils
"github.com/easysoft/zentaoatf/src/utils/date"
fileUtils
"github.com/easysoft/zentaoatf/src/utils/file"
logUtils
"github.com/easysoft/zentaoatf/src/utils/log"
"github.com/easysoft/zentaoatf/src/utils/vari"
"os"
"path"
...
...
@@ -40,8 +39,6 @@ func GenSuperApiUri(model string, methd string, params [][]string) string {
}
else
{
uri
=
fmt
.
Sprintf
(
"?m=api&f=getmodel&model=%s&methodName=%s¶ms=%s"
,
model
,
methd
,
paramStr
)
}
logUtils
.
PrintToCmd
(
uri
,
-
1
)
return
uri
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录