Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
易企天创
zentaoatf
提交
dbed31bf
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,发现更多精彩内容 >>
提交
dbed31bf
编写于
9月 02, 2019
作者:
aaronchen2k2k
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
test on win7
上级
41c0fb7c
变更
8
展开全部
隐藏空白更改
内联
并排
Showing
8 changed file
with
28 addition
and
14 deletion
+28
-14
go.sum
go.sum
+1
-0
res/messages_en.json
res/messages_en.json
+5
-0
res/messages_zh.json
res/messages_zh.json
+5
-0
res/res.go
res/res.go
+6
-6
src/action/gen.go
src/action/gen.go
+7
-3
src/action/run.go
src/action/run.go
+0
-2
src/utils/const/const.go
src/utils/const/const.go
+3
-3
src/utils/stdin/stdin.go
src/utils/stdin/stdin.go
+1
-0
未找到文件。
go.sum
浏览文件 @
dbed31bf
...
@@ -29,6 +29,7 @@ github.com/kardianos/osext v0.0.0-20170510131534-ae77be60afb1/go.mod h1:1NbS8ALr
...
@@ -29,6 +29,7 @@ github.com/kardianos/osext v0.0.0-20170510131534-ae77be60afb1/go.mod h1:1NbS8ALr
github.com/kardianos/osext
v0.0.0-20190222173326-2bc1f35cddc0/go.mod h1:
1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8=
github.com/kardianos/osext
v0.0.0-20190222173326-2bc1f35cddc0/go.mod h1:
1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8=
github.com/keybase/go-ps
v0.0.0-20161005175911-668c8856d999 h1:
2d+FLQbz4xRTi36DO1qYNUwfORax9XcQ0jhbO81Vago=
github.com/keybase/go-ps
v0.0.0-20161005175911-668c8856d999 h1:
2d+FLQbz4xRTi36DO1qYNUwfORax9XcQ0jhbO81Vago=
github.com/keybase/go-ps
v0.0.0-20161005175911-668c8856d999/go.mod h1:
hY+WOq6m2FpbvyrI93sMaypsttvaIL5nhVR92dTMUcQ=
github.com/keybase/go-ps
v0.0.0-20161005175911-668c8856d999/go.mod h1:
hY+WOq6m2FpbvyrI93sMaypsttvaIL5nhVR92dTMUcQ=
github.com/konsorten/go-windows-terminal-sequences
v1.0.1 h1:
mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk=
github.com/konsorten/go-windows-terminal-sequences
v1.0.1/go.mod h1:
T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/konsorten/go-windows-terminal-sequences
v1.0.1/go.mod h1:
T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/lestrrat/go-file-rotatelogs
v0.0.0-20180223000712-d3151e2a480f h1:
sgUSP4zdTUZYZgAGGtN5Lxk92rK+JUFOwf+FT99EEI4=
github.com/lestrrat/go-file-rotatelogs
v0.0.0-20180223000712-d3151e2a480f h1:
sgUSP4zdTUZYZgAGGtN5Lxk92rK+JUFOwf+FT99EEI4=
github.com/lestrrat/go-file-rotatelogs
v0.0.0-20180223000712-d3151e2a480f/go.mod h1:
UGmTpUd3rjbtfIpwAPrcfmGf/Z1HS95TATB+m57TPB8=
github.com/lestrrat/go-file-rotatelogs
v0.0.0-20180223000712-d3151e2a480f/go.mod h1:
UGmTpUd3rjbtfIpwAPrcfmGf/Z1HS95TATB+m57TPB8=
...
...
res/messages_en.json
浏览文件 @
dbed31bf
...
@@ -145,6 +145,11 @@
...
@@ -145,6 +145,11 @@
"message"
:
"only en(%s) and zh(%s) language is acceptable"
,
"message"
:
"only en(%s) and zh(%s) language is acceptable"
,
"translation"
:
"only en(%s) and zh(%s) language is acceptable"
"translation"
:
"only en(%s) and zh(%s) language is acceptable"
},
},
{
"id"
:
"no_cases"
,
"message"
:
"No test cases found"
,
"translation"
:
"No test cases found"
},
{
{
"id"
:
"no_scripts"
,
"id"
:
"no_scripts"
,
"message"
:
"No test scripts found"
,
"message"
:
"No test scripts found"
,
...
...
res/messages_zh.json
浏览文件 @
dbed31bf
...
@@ -133,6 +133,11 @@
...
@@ -133,6 +133,11 @@
"message"
:
"只支持语言en(%s)和zh(%s)"
,
"message"
:
"只支持语言en(%s)和zh(%s)"
,
"translation"
:
"只支持语言en(%s)和zh(%s)"
"translation"
:
"只支持语言en(%s)和zh(%s)"
},
},
{
"id"
:
"no_cases"
,
"message"
:
"No test cases found"
,
"translation"
:
"No test cases found"
},
{
{
"id"
:
"no_scripts"
,
"id"
:
"no_scripts"
,
"message"
:
"No test scripts found"
,
"message"
:
"No test scripts found"
,
...
...
res/res.go
浏览文件 @
dbed31bf
此差异已折叠。
点击以展开。
src/action/gen.go
浏览文件 @
dbed31bf
...
@@ -29,15 +29,19 @@ func Generate(productId string, moduleId string, suiteId string, taskId string,
...
@@ -29,15 +29,19 @@ func Generate(productId string, moduleId string, suiteId string, taskId string,
}
}
cases
:=
zentaoService
.
LoadTestCases
(
productId
,
moduleId
,
suiteId
,
taskId
)
cases
:=
zentaoService
.
LoadTestCases
(
productId
,
moduleId
,
suiteId
,
taskId
)
productId
=
cases
[
0
]
.
Product
zentaoService
.
GetCaseModules
(
productId
)
if
cases
!=
nil
{
if
cases
!=
nil
&&
len
(
cases
)
>
0
{
productId
=
cases
[
0
]
.
Product
zentaoService
.
GetCaseModules
(
productId
)
count
,
err
:=
scriptService
.
Generate
(
cases
,
scriptLang
,
independentFile
)
count
,
err
:=
scriptService
.
Generate
(
cases
,
scriptLang
,
independentFile
)
if
err
==
nil
{
if
err
==
nil
{
logUtils
.
PrintToCmd
(
i118Utils
.
I118Prt
.
Sprintf
(
"success_to_generate"
,
count
,
constant
.
ScriptDir
)
+
"
\n
"
,
-
1
)
logUtils
.
PrintToCmd
(
i118Utils
.
I118Prt
.
Sprintf
(
"success_to_generate"
,
count
,
constant
.
ScriptDir
)
+
"
\n
"
,
-
1
)
}
else
{
}
else
{
logUtils
.
PrintToCmd
(
err
.
Error
(),
color
.
FgRed
)
logUtils
.
PrintToCmd
(
err
.
Error
(),
color
.
FgRed
)
}
}
}
else
{
logUtils
.
PrintToCmd
(
i118Utils
.
I118Prt
.
Sprintf
(
"no_cases"
),
color
.
FgRed
)
}
}
}
}
src/action/run.go
浏览文件 @
dbed31bf
...
@@ -43,8 +43,6 @@ func Run(files []string, suiteIdStr string, taskIdStr string) {
...
@@ -43,8 +43,6 @@ func Run(files []string, suiteIdStr string, taskIdStr string) {
scriptService
.
GetScriptByIdsInDir
(
files
[
0
],
caseIdMap
,
&
cases
)
scriptService
.
GetScriptByIdsInDir
(
files
[
0
],
caseIdMap
,
&
cases
)
}
else
{
// no suiteId, taskId param
}
else
{
// no suiteId, taskId param
aa
:=
path
.
Ext
(
files
[
1
])
_
=
aa
if
len
(
files
)
>
1
&&
fileUtils
.
IsDir
(
files
[
0
])
&&
if
len
(
files
)
>
1
&&
fileUtils
.
IsDir
(
files
[
0
])
&&
path
.
Ext
(
files
[
1
])
==
"."
+
constant
.
ExtNameSuite
{
// run suite file
path
.
Ext
(
files
[
1
])
==
"."
+
constant
.
ExtNameSuite
{
// run suite file
...
...
src/utils/const/const.go
浏览文件 @
dbed31bf
...
@@ -37,19 +37,19 @@ var (
...
@@ -37,19 +37,19 @@ var (
RequestTypePathInfo
=
"PATH_INFO"
RequestTypePathInfo
=
"PATH_INFO"
Usage
=
` help -h 查看帮助信息。
Usage
=
` help -h 查看帮助信息。
set -s 设置语言、禅道系统同步参数。
set -s 设置语言、禅道系统同步参数。
用户对当前目录需要有写权限。
co checkout 导出禅道系统中的用例,已存在的将更新标题和步骤描述。可指定产品、套件、测试单编号。
co checkout 导出禅道系统中的用例,已存在的将更新标题和步骤描述。可指定产品、套件、测试单编号。
up update 从禅道系统更新已存在的用例。可指定产品、模块、套件、测试单编号。
up update 从禅道系统更新已存在的用例。可指定产品、模块、套件、测试单编号。
run -r 执行测试用例。可指定目录、套件、脚本、结果文件的路径,以及套件和任务的编号,多个文件间用空格隔开。
run -r 执行测试用例。可指定目录、套件、脚本、结果文件的路径,以及套件和任务的编号,多个文件间用空格隔开。
ci 将脚本中修改的用例信息,同步到禅道系统。
ci 将脚本中修改的用例信息,同步到禅道系统。
cr 将用例执行结果提交到禅道系统中。
cr 将用例执行结果提交到禅道系统中。
cb 将执行结果中的失败用例,作为缺陷提交到
餐到系统。可指定测试日志目录和用例编号,弹出命令行图形界面
。
cb 将执行结果中的失败用例,作为缺陷提交到
禅道系统
。
list ls -l 查看测试用例列表。可指定目录和文件的列表,之间用空格隔开。
list ls -l 查看测试用例列表。可指定目录和文件的列表,之间用空格隔开。
view -v 查看测试用例详情。可指定目录和文件的列表,之间用空格隔开。`
view -v 查看测试用例详情。可指定目录和文件的列表,之间用空格隔开。`
Example
=
` $>atf.exe run scripts-demo\tc-01.bat 执行演示测试用例,非windows系统请使用tc-01.sh脚本。
Example
=
` $>atf.exe run scripts-demo\tc-01.bat 执行演示测试用例,非windows系统请使用tc-01.sh脚本。
$>atf.exe set 根据系统提示,设置语言、禅道系统地址、账号和密码参数。
$>atf.exe set 根据系统提示,设置语言、禅道系统地址、账号和密码参数。
可使用测试数据 http://ruiyinxin.test.zentao.net
,
autotest01 / P2ssw0rd
可使用测试数据 http://ruiyinxin.test.zentao.net
autotest01 / P2ssw0rd
$>atf.exe co 交互式导出禅道测试用例,将提示用户输入导出类型和编号。
$>atf.exe co 交互式导出禅道测试用例,将提示用户输入导出类型和编号。
$>atf.exe co -product 1 -language python 导出编号为1的产品测试用例,使用python语言,缩写-p -l。
$>atf.exe co -product 1 -language python 导出编号为1的产品测试用例,使用python语言,缩写-p -l。
$>atf.exe co -p 1 -m 15 -l python 导出产品编号为1、模块编号为16的测试用例。
$>atf.exe co -p 1 -m 15 -l python 导出产品编号为1、模块编号为16的测试用例。
...
...
src/utils/stdin/stdin.go
浏览文件 @
dbed31bf
...
@@ -148,6 +148,7 @@ func getInput(regx string, fmtStr string, params ...interface{}) string {
...
@@ -148,6 +148,7 @@ func getInput(regx string, fmtStr string, params ...interface{}) string {
if
pass
{
if
pass
{
return
ret
return
ret
}
else
{
}
else
{
ret
=
""
logUtils
.
PrintToStdOut
(
i118Utils
.
I118Prt
.
Sprintf
(
msg
),
color
.
FgRed
)
logUtils
.
PrintToStdOut
(
i118Utils
.
I118Prt
.
Sprintf
(
msg
),
color
.
FgRed
)
}
}
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录