Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
1e74bc15
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1187
Star
22018
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
1e74bc15
编写于
11月 29, 2021
作者:
L
liuyq-617
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TS-748]<test>fix windows input limit
上级
e909873b
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
81 addition
and
1 deletion
+81
-1
tests/pytest/fulltest.bat
tests/pytest/fulltest.bat
+2
-1
tests/pytest/tools/windows_input.py
tests/pytest/tools/windows_input.py
+79
-0
未找到文件。
tests/pytest/fulltest.bat
浏览文件 @
1e74bc15
...
...
@@ -18,4 +18,5 @@ python .\test.py -f query\filterAllIntTypes.py
python
.\test.py
-f
query
\filterFloatAndDouble.py
python
.\test.py
-f
query
\filterOtherTypes.py
python
.\test.py
-f
query
\querySort.py
python
.\test.py
-f
query
\queryJoin.py
\ No newline at end of file
python
.\test.py
-f
query
\queryJoin.py
python
.\test.py
-f
tools
\windows_input.py
\ No newline at end of file
tests/pytest/tools/windows_input.py
0 → 100644
浏览文件 @
1e74bc15
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
#
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
#
###################################################################
# -*- coding: utf-8 -*-
import
os
from
uiautomation
import
WindowControl
from
util.cases
import
*
from
util.sql
import
*
class
TDTestCase
:
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
(),
logSql
)
self
.
host
=
conn
.
_host
def
win_input_test
(
self
):
os
.
system
(
"start"
)
time
.
sleep
(
1
)
# 获取CMD窗口
# window = DocumentControl(searchDepth=3, Name='Text Area')
window
=
WindowControl
(
searchDepth
=
1
,
AutomationId
=
'Console Window'
)
# 切换英文输入法
# window.SendKeys('\\')
# window.SendKeys('{Enter}')
# window.SendKeys('{Shift}')
# window.SendKeys('\\')
# window.SendKeys('{Enter}')
# 切换目录
window
.
SendKeys
(
'c:'
)
window
.
SendKeys
(
'{Enter}'
)
window
.
SendKeys
(
'cd
\\
'
)
window
.
SendKeys
(
'{Enter}'
)
window
.
SendKeys
(
'cd c:
\\
TDengine'
)
window
.
SendKeys
(
'{Enter}'
)
# 启动taos.exe
window
.
SendKeys
(
'taos.exe -h %s || taos.exe'
%
(
self
.
host
))
window
.
SendKeys
(
'{Enter}'
)
# 输入
temp
=
''
for
i
in
range
(
300
):
temp
+=
'a'
sql
=
"'insert into db.tb values(now,'%s')"
%
temp
window
.
SendKeys
(
sql
)
window
.
SendKeys
(
'{Enter}'
)
window
.
SendKeys
(
'{Ctrl}C'
)
window
.
SendKeys
(
'exit'
)
window
.
SendKeys
(
'{Enter}'
)
def
run
(
self
):
tdSql
.
prepare
()
ret
=
tdSql
.
execute
(
'create table tb (ts timestamp, i binary(300))'
)
self
.
win_input_test
()
tdSql
.
query
(
"select * from tb"
)
tdSql
.
checkRows
(
1
)
def
stop
(
self
):
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录