Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
易企天创
zentaoatf
提交
a0654a8c
Z
zentaoatf
项目概览
易企天创
/
zentaoatf
大约 1 年 前同步成功
通知
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,发现更多精彩内容 >>
提交
a0654a8c
编写于
6月 27, 2022
作者:
Z
zhaoke
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'morden-ui' of github.com:easysoft/zentaoatf into morden-ui
上级
e71e1539
6be2eea3
变更
10
显示空白变更内容
内联
并排
Showing
10 changed file
with
64 addition
and
17 deletion
+64
-17
.gitignore
.gitignore
+1
-0
cmd/command/main.go
cmd/command/main.go
+12
-1
demo/sample/2_with_group.php
demo/sample/2_with_group.php
+2
-2
internal/command/action/bug.go
internal/command/action/bug.go
+11
-2
internal/command/config/config.go
internal/command/config/config.go
+0
-4
internal/pkg/consts/var.go
internal/pkg/consts/var.go
+8
-6
res/doc/sample.txt
res/doc/sample.txt
+2
-0
xdoc/test1.py
xdoc/test1.py
+17
-0
xdoc/test2.py
xdoc/test2.py
+6
-0
xdoc/test3.py
xdoc/test3.py
+5
-2
未找到文件。
.gitignore
浏览文件 @
a0654a8c
...
...
@@ -30,3 +30,4 @@ logs/
#vim
.vim/
.*.swp
/.scannerwork/
cmd/command/main.go
浏览文件 @
a0654a8c
...
...
@@ -67,6 +67,8 @@ func main() {
flagSet
.
StringVar
(
&
keywords
,
"k"
,
""
,
""
)
flagSet
.
StringVar
(
&
keywords
,
"keywords"
,
""
,
""
)
flagSet
.
BoolVar
(
&
commConsts
.
AutoCommitResult
,
"cr"
,
false
,
""
)
flagSet
.
BoolVar
(
&
commConsts
.
AutoCommitBug
,
"cb"
,
false
,
""
)
flagSet
.
BoolVar
(
&
noNeedConfirm
,
"y"
,
false
,
""
)
flagSet
.
BoolVar
(
&
commConsts
.
Verbose
,
"verbose"
,
false
,
""
)
...
...
@@ -113,7 +115,7 @@ func main() {
case
"cb"
:
files
:=
fileUtils
.
GetFilesFromParams
(
os
.
Args
[
2
:
])
if
err
:=
flagSet
.
Parse
(
os
.
Args
[
len
(
files
)
+
2
:
]);
err
==
nil
{
action
.
CommitBug
(
files
,
stringUtils
.
ParseInt
(
productId
))
action
.
CommitBug
(
files
,
stringUtils
.
ParseInt
(
productId
)
,
noNeedConfirm
)
}
case
"list"
,
"ls"
,
"-l"
:
...
...
@@ -161,6 +163,15 @@ func run(args []string) {
runUnitTest
(
args
)
}
else
{
// ztf test
runFuncTest
(
args
)
if
commConsts
.
AutoCommitResult
&&
productId
!=
""
{
action
.
CommitZTFTestResult
([]
string
{
commConsts
.
ExecLogDir
},
stringUtils
.
ParseInt
(
productId
),
stringUtils
.
ParseInt
(
productId
),
true
)
}
if
commConsts
.
AutoCommitBug
&&
productId
!=
""
{
action
.
CommitBug
([]
string
{
commConsts
.
ExecLogDir
},
stringUtils
.
ParseInt
(
productId
),
true
)
}
}
}
...
...
demo/sample/2_with_group.php
浏览文件 @
a0654a8c
...
...
@@ -3,10 +3,10 @@
/**
title=with multi groups
cid=
0
cid=
2
pid=0
step 1 >> expect 1
step 1 >> expect 1
1
step 2 >> expect 2
step 3 >>
...
...
internal/command/action/bug.go
浏览文件 @
a0654a8c
...
...
@@ -22,7 +22,7 @@ var (
bugFields
commDomain
.
ZentaoBugFields
)
func
CommitBug
(
files
[]
string
,
productId
int
)
{
func
CommitBug
(
files
[]
string
,
productId
int
,
noNeedConfirm
bool
)
{
var
resultDir
string
if
len
(
files
)
>
0
{
resultDir
=
files
[
0
]
...
...
@@ -56,9 +56,18 @@ func CommitBug(files []string, productId int) {
return
}
if
noNeedConfirm
{
for
_
,
caseId
:=
range
ids
{
reportBug
(
resultDir
,
caseId
,
productId
)
}
return
}
// wait to input
for
{
logUtils
.
ExecConsole
(
color
.
FgCyan
,
"
\n
"
+
i118Utils
.
Sprintf
(
"enter_case_id_for_report_bug"
))
logUtils
.
ExecConsole
(
color
.
FgCyan
,
strings
.
Join
(
lines
,
"
\n
"
))
logUtils
.
ExecConsole
(
-
1
,
strings
.
Join
(
lines
,
"
\n
"
))
var
caseId
string
fmt
.
Scanln
(
&
caseId
)
if
caseId
==
"exit"
{
...
...
internal/command/config/config.go
浏览文件 @
a0654a8c
...
...
@@ -16,7 +16,6 @@ import (
resUtils
"github.com/easysoft/zentaoatf/pkg/lib/res"
"github.com/fatih/color"
"github.com/spf13/viper"
"log"
"os"
"path/filepath"
"reflect"
...
...
@@ -26,10 +25,7 @@ func InitConfig() {
commConsts
.
IsRelease
=
commonUtils
.
IsRelease
()
commConsts
.
WorkDir
=
fileUtils
.
GetWorkDir
()
log
.
Println
(
"==="
+
commConsts
.
WorkDir
)
commConsts
.
ZtfDir
=
fileUtils
.
GetZTFDir
()
log
.
Println
(
"==="
+
commConsts
.
ZtfDir
)
log
.
Println
(
commonUtils
.
IsRelease
())
commConsts
.
ConfigPath
=
filepath
.
Join
(
commConsts
.
WorkDir
,
commConsts
.
ConfigDir
,
commConsts
.
ConfigFile
)
if
commConsts
.
IsRelease
{
...
...
internal/pkg/consts/var.go
浏览文件 @
a0654a8c
...
...
@@ -9,6 +9,8 @@ var (
LanguageEn
=
"en"
Language
=
LanguageZh
AutoCommitResult
bool
AutoCommitBug
bool
Verbose
=
false
IsRelease
bool
ZtfDir
string
...
...
res/doc/sample.txt
浏览文件 @
a0654a8c
...
...
@@ -11,6 +11,8 @@ $>ztf.exe run product01 product01\all.cs 执行all.cs测试套件的
$>ztf.exe run log\001\result.txt 执行result.txt结果文件中的失败用例。
$>ztf.exe run product01 -suite 1 执行禅道系统中编号为1的套件,脚本在product01目录,缩写-s。
$>ztf.exe run -task 1 执行禅道系统中编号为1的任务,脚本在当期目录, 缩写-t。
$>ztf.exe run demo\demo -p 1 -cr -cb 执行目录demo下的脚本,完成后提交结果到禅道,并将失败结果提交成用例。
cr提交结果,-cb提交缺陷,-p必填参数指定产品ID
$>ztf.exe run demo\autoit 执行ZTF自带AutoIT脚本。
$>ztf.exe run demo\selenium\chrome.php --interp runtime\php\php7\php.exe
...
...
xdoc/test1.py
0 → 100755
浏览文件 @
a0654a8c
#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
title=check string matches pattern
cid=1
pid=1
1 登录RDsim
2 点击建模按钮 >> 设置
'''
from
test2
import
start_app
c
=
start_app
()
print
(
c
)
xdoc/test2.py
0 → 100755
浏览文件 @
a0654a8c
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import
os
def
start_app
():
return
"设置"
xdoc/test3.py
浏览文件 @
a0654a8c
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Author: Beibei
# @Time: 2022/6/23 17:14
'''
title=建模按钮功能
...
...
@@ -13,4 +11,9 @@ pid=1
'''
import
sys
,
io
,
platform
if
(
platform
.
system
()
==
'Windows'
):
import
sys
,
io
sys
.
stdout
=
io
.
TextIOWrapper
(
sys
.
stdout
.
buffer
,
encoding
=
'utf8'
)
print
(
"设置"
)
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录