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
f1cd34dc
Commit
f1cd34dc
authored
May 24, 2021
by
huangchengcheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ҵģ
parent
25e4c889
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
+11
-8
test_case/bmc/test_my.py
+11
-8
No files found.
test_case/bmc/test_my.py
View file @
f1cd34dc
...
...
@@ -24,6 +24,7 @@ class TestMy:
self
.
headers
=
config
.
BMCConfig
.
headers
mysql
=
MYSQL
(
"10.197.236.190"
,
3306
,
"root"
,
"123456"
,
db
=
"edl_public"
)
mysql
.
ExecuNonQuery
(
"insert into edl_public.feedback_type values ('10008611','自动化类型','0','1','0','2021-05-01 16:51:12','2021-05-01 16:51:12','520100,330100,500100');"
)
mysql
.
ExecuNonQuery
(
"INSERT INTO edl_public.trade (user_id,phone,brand_id,shop_id,trade_type,trade_amount,privilege_amount,pay_amount,uuid,trade_no,trade_source,memo,gmt_finished,status,gmt_create,gmt_modified,shop_name,brand_name,trade_status,remark_status,verification_status,settlement_status,refund_status,close_status,gmt_closed,close_memo,expired_status,gmt_expired,bill_status) VALUES (598137,'17822000000',48,112,2,2.55,0.00,2.55,'7ac6253d-8586-475d-8474-be848fe5c4b6','hik202105081390911897531973632',1,NULL ,NULL ,1,'2021-05-08 14:10:13.000','2021-05-24 17:25:30.000','回归测试门店1','回归(个人)1',3,'N/A','N/A','N/A','N/A','N/A',NULL,NULL,'N/A','2021-06-07 14:10:13.000','N/A');"
)
@allure.story
(
"个人信息获取"
)
...
...
@@ -579,8 +580,7 @@ class TestMy:
mysql
.
ExecuNonQuery
(
"update edl_public.feedback_main set status='1'where user_id='598137'and feedback_type_id='10008611';"
)
else
:
mysql
=
MYSQL
(
"10.197.236.190"
,
3306
,
"root"
,
"123456"
,
db
=
"edl_public"
)
mysql
.
ExecuNonQuery
(
"update edl_public.feedback_main set read_flag='1'where user_id='598137'and feedback_type_id='10008611';"
)
mysql
.
ExecuNonQuery
(
"update edl_public.feedback_main set read_flag='1'where user_id='598137'and feedback_type_id='10008611';"
)
res
=
request_main
(
url
,
self
.
headers
,
method
,
data
)
try
:
assert
res
[
"code"
]
==
expectdata
[
"code"
]
...
...
@@ -610,8 +610,11 @@ class TestMy:
mysql
.
ExecuNonQuery
(
"delete from feedback_type where id='10008611';"
)
mysql
.
ExecuNonQuery
(
"delete from feedback_chat_record where user_id='598137'"
)
mysql
.
ExecuNonQuery
(
"delete from feedback_main where user_id='598137'"
)
if
__name__
==
'__main__'
:
pytest
.
main
([
"-s"
,
"-v"
,
"test_my.py"
,
'--alluredir'
,
'./bmc/report'
,
"--clean-alluredir"
])
# pytest.main(['-v', '-s', "test_my.py::TestMy::test_feedbacksolve", '--alluredir', './bmc/report', "--clean-alluredir"])
os
.
system
(
'allure serve ./bmc/report'
)
\ No newline at end of file
mysql
.
ExecuNonQuery
(
"update edl_public.user set nickname='自动化' where id='598137';"
)
mysql
.
ExecuNonQuery
(
"delete from edl_public.user_address where user_id='598137'and address in ('接口自动化详细地址','存在');"
)
mysql
.
ExecuNonQuery
(
"delete from trade where user_id='598137'and trade_no='hik202105081390911897531973632';"
)
# if __name__ == '__main__':
# pytest.main(["-s","-v","test_my.py",'--alluredir', './bmc/report',"--clean-alluredir"])
# # pytest.main(['-v', '-s', "test_my.py::TestMy::test_basiccouponCode", '--alluredir', './bmc/report', "--clean-alluredir"])
# os.system('allure serve ./bmc/report')
\ No newline at end of file
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