Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
易企天创
zentaoatf
提交
8c9377a0
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,发现更多精彩内容 >>
提交
8c9377a0
编写于
10月 18, 2022
作者:
雨
雨爱无痕
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix issue
上级
daafe763
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
15 addition
and
12 deletion
+15
-12
internal/pkg/helper/exec/kill-win.go
internal/pkg/helper/exec/kill-win.go
+8
-7
test/ui/ui_run_from_result_test.go
test/ui/ui_run_from_result_test.go
+4
-2
test/ui/ui_workspace_test.go
test/ui/ui_workspace_test.go
+3
-3
未找到文件。
internal/pkg/helper/exec/kill-win.go
浏览文件 @
8c9377a0
...
...
@@ -22,15 +22,16 @@ func KillProcessByUUID(uuid string) {
}
line
=
strings
.
TrimSpace
(
line
)
cols
:=
strings
.
Split
(
line
,
" "
)
pid
:=
""
if
len
(
cols
)
>
3
{
fmt
.
Println
(
fmt
.
Sprintf
(
`taskkill /F /pid %s`
,
cols
[
3
]))
cmd2
:=
exec
.
Command
(
"cmd"
)
cmd2
.
SysProcAttr
=
&
syscall
.
SysProcAttr
{
CmdLine
:
fmt
.
Sprintf
(
`/c taskkill /F /pid %s`
,
cols
[
3
]),
HideWindow
:
true
}
cmd2
.
Start
()
}
else
if
len
(
cols
)
==
2
{
fmt
.
Println
(
fmt
.
Sprintf
(
`taskkill /F /pid %s`
,
cols
[
2
]
))
pid
=
cols
[
3
]
}
else
if
len
(
cols
)
>
2
{
pid
=
cols
[
2
]
}
if
pid
!=
""
{
fmt
.
Println
(
fmt
.
Sprintf
(
`taskkill /F /pid %s`
,
pid
))
cmd2
:=
exec
.
Command
(
"cmd"
)
cmd2
.
SysProcAttr
=
&
syscall
.
SysProcAttr
{
CmdLine
:
fmt
.
Sprintf
(
`/c taskkill /F /pid %s`
,
cols
[
2
]
),
HideWindow
:
true
}
cmd2
.
SysProcAttr
=
&
syscall
.
SysProcAttr
{
CmdLine
:
fmt
.
Sprintf
(
`/c taskkill /F /pid %s`
,
pid
),
HideWindow
:
true
}
cmd2
.
Start
()
}
}
...
...
test/ui/ui_run_from_result_test.go
浏览文件 @
8c9377a0
...
...
@@ -26,6 +26,7 @@ func RunReExecFailCase(t provider.T) {
t
.
Errorf
(
"Exec failed case fail"
)
t
.
FailNow
()
}
webpage
.
WaitForTimeout
(
2000
)
resultTitle
:=
webpage
.
InnerText
(
"#rightPane .result-list-item .list-item-title"
)
if
resultTitle
!=
"1_string_match.php"
{
t
.
Errorf
(
"Find result in rightPane fail"
)
...
...
@@ -60,16 +61,17 @@ func RunReExecAllCase(t provider.T) {
t
.
Errorf
(
"Exec failed case fail"
)
t
.
FailNow
()
}
webpage
.
WaitForTimeout
(
2000
)
resultTitle
:=
webpage
.
InnerText
(
"#rightPane .result-list-item .list-item-title"
)
if
resultTitle
!=
"1_string_match.php"
{
t
.
Errorf
(
"Find result in rightPane fail"
)
t
.
Errorf
(
"Find result
title
in rightPane fail"
)
t
.
FailNow
()
}
timeElement
:=
locator
.
Locator
(
".time>>span"
)
logTime
:=
timeElement
.
InnerText
()
resultTime
:=
webpage
.
InnerText
(
"#rightPane .result-list-item .list-item-trailing-text"
)
if
logTime
[
:
5
]
!=
resultTime
{
t
.
Errorf
(
"Find result in rightPane fail"
)
t
.
Errorf
(
"Find result
time
in rightPane fail"
)
t
.
FailNow
()
}
}
...
...
test/ui/ui_workspace_test.go
浏览文件 @
8c9377a0
...
...
@@ -45,10 +45,10 @@ func SyncFromZentao(t provider.T) {
webpage
,
_
:=
plwHelper
.
OpenUrl
(
"http://127.0.0.1:8000/"
,
t
)
defer
webpage
.
Close
()
ztfTestHelper
.
SelectSite
(
webpage
)
var
waitTimeOut
float64
=
5000
webpage
.
WaitForSelector
(
".tree-node"
,
playwright
.
PageWaitForSelectorOptions
{
Timeout
:
&
waitTimeOut
})
plwConf
.
DisableErr
()
locator
:=
webpage
.
Locator
(
".tree-node"
,
playwright
.
PageLocatorOptions
{
HasText
:
"单元测试工作目录"
})
defer
plwConf
.
EnableErr
()
webpage
.
WaitForSelectorTimeout
(
".tree-node-root>>has-text('单元测试工作目录')"
,
2000
)
locator
:=
webpage
.
Locator
(
".tree-node-root>>has-text('单元测试工作目录')"
)
c
:=
locator
.
Count
()
if
c
==
0
{
plwConf
.
EnableErr
()
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录