Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
InterfaceAutoTest
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
TestAuto
InterfaceAutoTest
Commits
52966db2
Commit
52966db2
authored
Aug 25, 2021
by
hanxiaojuan
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://10.197.236.199:8001/TestAuto/InterfaceAutoTest
parents
a252d3ff
d880c008
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
13 deletions
+24
-13
common/db.py
+3
-1
common/utils/dingTalk.py
+12
-8
config.py
+9
-4
test_case/safe_transportation/jgd/test_riskManagement.py
+0
-0
test_case_data/safe_transportation/jgd_riskCase.xlsx
+0
-0
No files found.
common/db.py
View file @
52966db2
...
@@ -96,7 +96,9 @@ if __name__ == '__main__':
...
@@ -96,7 +96,9 @@ if __name__ == '__main__':
mysql_config
=
(
"10.197.236.190"
,
3306
,
"root"
,
"123456"
,
""
)
mysql_config
=
(
"10.197.236.190"
,
3306
,
"root"
,
"123456"
,
""
)
# mysql = MYSQL(host="10.197.236.190", port=3306, user="root", pwd="123456", db="edl_private")
# mysql = MYSQL(host="10.197.236.190", port=3306, user="root", pwd="123456", db="edl_private")
mysql
=
MYSQL
(
*
mysql_config
)
mysql
=
MYSQL
(
*
mysql_config
)
info
=
mysql
.
ExecuQuery
(
"SELECT * FROM db_tbd_base1.project;"
)
# info = mysql.ExecuQuery("SELECT * FROM db_tbd_base1.project;")
info
=
mysql
.
ExecuQuery
(
"select id from db_tbd_base1.risk_info where risk_name='自动化新增';"
)
print
(
info
)
print
(
info
)
# r = RedisString(0).get('bmc:captcha:1ad7d0e9-1e01-454c-8500-d7b5b15c90ff')
# r = RedisString(0).get('bmc:captcha:1ad7d0e9-1e01-454c-8500-d7b5b15c90ff')
common/utils/dingTalk.py
View file @
52966db2
...
@@ -94,7 +94,7 @@ def dingTalk_markdown_bmy(group):
...
@@ -94,7 +94,7 @@ def dingTalk_markdown_bmy(group):
def
dingTalk_markdown_safe_transportation
(
group
):
def
dingTalk_markdown_safe_transportation
(
group
):
for
i
in
group
:
for
i
in
group
:
"""发送消息到钉钉群(
企业云
)"""
"""发送消息到钉钉群(
交委
)"""
timestamp
=
str
(
round
(
time
.
time
()
*
1000
))
timestamp
=
str
(
round
(
time
.
time
()
*
1000
))
sign
=
get_sign
(
i
[
"secret"
])
sign
=
get_sign
(
i
[
"secret"
])
webhook
=
i
[
"webhook"
]
+
f
"×tamp={timestamp}&sign={sign}"
webhook
=
i
[
"webhook"
]
+
f
"×tamp={timestamp}&sign={sign}"
...
@@ -103,7 +103,7 @@ def dingTalk_markdown_safe_transportation(group):
...
@@ -103,7 +103,7 @@ def dingTalk_markdown_safe_transportation(group):
"markdown"
:
{
"markdown"
:
{
"title"
:
"接口执行报告"
,
"title"
:
"接口执行报告"
,
"text"
:
f
"#### 接口自动化测试报告
\n
> 本消息由Jenkins构建后自动发送
\n
>
\
"text"
:
f
"#### 接口自动化测试报告
\n
> 本消息由Jenkins构建后自动发送
\n
>
\

\n
> ###### 点击查看 >> [安全运输呀](http://10.197.236.10:8080/job/bmy
/allure/)
\n
"

\n
> ###### 点击查看 >> [交委安全运输监管平台](http://10.197.236.10:8080/job/safe_transportation
/allure/)
\n
"
},
},
'at'
:
{
'isAtAll'
:
False
}}
'at'
:
{
'isAtAll'
:
False
}}
post_data
=
json
.
dumps
(
data
)
post_data
=
json
.
dumps
(
data
)
...
@@ -134,11 +134,14 @@ def dingTalk_markdown_safe_transportation(group):
...
@@ -134,11 +134,14 @@ def dingTalk_markdown_safe_transportation(group):
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
test_group
=
[{
"secret"
:
"SEC40a1be4bbd9214e16ba288208fd608b2b590e82e853fa9b24c1850a506c6185b"
,
test_group
=
[{
"secret"
:
"SEC40a1be4bbd9214e16ba288208fd608b2b590e82e853fa9b24c1850a506c6185b"
,
"webhook"
:
"https://oapi.dingtalk.com/robot/send?access_token=e830b05eeee88da31972099e403a74d05ec55719360707dc44e532c0d0b49cb6"
,
"webhook"
:
"https://oapi.dingtalk.com/robot/send?access_token=e830b05eeee88da31972099e403a74d05ec55719360707dc44e532c0d0b49cb6"
,
"group"
:
"自动化测试组 - 技术和思路分享"
}
"group"
:
"自动化测试组 - 技术和思路分享"
}
]
# ,
# {"secret": "SEC1d08f46da74337cc0e1cd5bb9ad19622d825483343fdfa43ce396881e4745bdb",
bmy_group
=
[{
"secret"
:
"SEC40a1be4bbd9214e16ba288208fd608b2b590e82e853fa9b24c1850a506c6185b"
,
# "webhook": "https://oapi.dingtalk.com/robot/send?access_token=f9e005c1a984b9607960345d38669337b1115d1141a0294e98666443b312115b",
"webhook"
:
"https://oapi.dingtalk.com/robot/send?access_token=e830b05eeee88da31972099e403a74d05ec55719360707dc44e532c0d0b49cb6"
,
# "group": "自动群"}
"group"
:
"自动化测试组 - 技术和思路分享"
},
{
"secret"
:
"SEC7714672a0be0239dbff12083d6beca3961490f1f5384c616ea259015d7e71cd1"
,
"webhook"
:
"https://oapi.dingtalk.com/robot/send?access_token=10baf66992f12849793666ee882569bf50d313e9c070ab1afbff25cb9ffcd567"
,
"group"
:
"测试序列"
}
]
]
bmc_group
=
[{
"secret"
:
"SECd10e7eaf4ae5e4a9b15cb059951519c0d8537721fd588e38b861c411ce6442d3"
,
bmc_group
=
[{
"secret"
:
"SECd10e7eaf4ae5e4a9b15cb059951519c0d8537721fd588e38b861c411ce6442d3"
,
"webhook"
:
"https://oapi.dingtalk.com/robot/send?access_token=9755709d67e98f6adfa09c884b2b62480b5315ffb65acde5309094206374e3a1"
,
"webhook"
:
"https://oapi.dingtalk.com/robot/send?access_token=9755709d67e98f6adfa09c884b2b62480b5315ffb65acde5309094206374e3a1"
,
...
@@ -146,6 +149,6 @@ if __name__ == '__main__':
...
@@ -146,6 +149,6 @@ if __name__ == '__main__':
{
"secret"
:
"SEC465015385218e70a94f107a16f72dd33d8fc118c3b2a631e0433685302f2fbb3"
,
{
"secret"
:
"SEC465015385218e70a94f107a16f72dd33d8fc118c3b2a631e0433685302f2fbb3"
,
"webhook"
:
"https://oapi.dingtalk.com/robot/send?access_token=229908a83825ed56abbf728d3382e446a4e8a90e9ad302c37a036bcbccbbf9ee"
,
"webhook"
:
"https://oapi.dingtalk.com/robot/send?access_token=229908a83825ed56abbf728d3382e446a4e8a90e9ad302c37a036bcbccbbf9ee"
,
"group"
:
"自动化小组"
}]
"group"
:
"自动化小组"
}]
dingTalk_markdown_safe_transportation
(
test
_group
)
dingTalk_markdown_safe_transportation
(
bmy
_group
)
# dingTalk_markdown(test_group,"https://aqjg.gyszhjt.com:60028/img/group1/M00/00/04/Cgs5XWD2NrOACeeHAAhEU1jS9Xc475.png","交委项目","http://10.197.236.10:8080/job/bmc/allure/")
# dingTalk_markdown(test_group,"https://aqjg.gyszhjt.com:60028/img/group1/M00/00/04/Cgs5XWD2NrOACeeHAAhEU1jS9Xc475.png","交委项目","http://10.197.236.10:8080/job/bmc/allure/")
\ No newline at end of file
config.py
View file @
52966db2
...
@@ -19,13 +19,18 @@ class BaseConfig():
...
@@ -19,13 +19,18 @@ class BaseConfig():
bmc_group
=
[{
"secret"
:
"SECd10e7eaf4ae5e4a9b15cb059951519c0d8537721fd588e38b861c411ce6442d3"
,
bmc_group
=
[{
"secret"
:
"SECd10e7eaf4ae5e4a9b15cb059951519c0d8537721fd588e38b861c411ce6442d3"
,
"webhook"
:
"https://oapi.dingtalk.com/robot/send?access_token=9755709d67e98f6adfa09c884b2b62480b5315ffb65acde5309094206374e3a1"
,
"webhook"
:
"https://oapi.dingtalk.com/robot/send?access_token=9755709d67e98f6adfa09c884b2b62480b5315ffb65acde5309094206374e3a1"
,
"group"
:
"斑马信用测试"
},
"group"
:
"斑马信用测试"
},
{
"secret"
:
"SEC465015385218e70a94f107a16f72dd33d8fc118c3b2a631e0433685302f2fbb3"
,
{
"secret"
:
"SEC7714672a0be0239dbff12083d6beca3961490f1f5384c616ea259015d7e71cd1"
,
"webhook"
:
"https://oapi.dingtalk.com/robot/send?access_token=229908a83825ed56abbf728d3382e446a4e8a90e9ad302c37a036bcbccbbf9ee"
,
"webhook"
:
"https://oapi.dingtalk.com/robot/send?access_token=10baf66992f12849793666ee882569bf50d313e9c070ab1afbff25cb9ffcd567"
,
"group"
:
"自动化小组"
}]
"group"
:
"测试序列"
}
]
# 交委钉钉群
# 交委钉钉群
bmy_group
=
[{
"secret"
:
"SEC40a1be4bbd9214e16ba288208fd608b2b590e82e853fa9b24c1850a506c6185b"
,
bmy_group
=
[{
"secret"
:
"SEC40a1be4bbd9214e16ba288208fd608b2b590e82e853fa9b24c1850a506c6185b"
,
"webhook"
:
"https://oapi.dingtalk.com/robot/send?access_token=e830b05eeee88da31972099e403a74d05ec55719360707dc44e532c0d0b49cb6"
,
"webhook"
:
"https://oapi.dingtalk.com/robot/send?access_token=e830b05eeee88da31972099e403a74d05ec55719360707dc44e532c0d0b49cb6"
,
"group"
:
"自动化测试组 - 技术和思路分享"
}]
"group"
:
"自动化测试组 - 技术和思路分享"
},
{
"secret"
:
"SEC7714672a0be0239dbff12083d6beca3961490f1f5384c616ea259015d7e71cd1"
,
"webhook"
:
"https://oapi.dingtalk.com/robot/send?access_token=10baf66992f12849793666ee882569bf50d313e9c070ab1afbff25cb9ffcd567"
,
"group"
:
"测试序列"
}
]
# 日志相关
# 日志相关
log_path
=
r''
# 日志路径
log_path
=
r''
# 日志路径
...
...
test_case/safe_transportation/jgd/test_riskManagement.py
View file @
52966db2
This diff is collapsed.
Click to expand it.
test_case_data/safe_transportation/jgd_riskCase.xlsx
View file @
52966db2
No preview for this file type
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment