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
fe83f8e5
Commit
fe83f8e5
authored
May 19, 2021
by
taoke
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
ebaf757b
917b3c3a
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
6 additions
and
2 deletions
+6
-2
common/tools.py
+1
-0
test_case/bmc/test_integral.py
+5
-2
test_case_data/bmc/bmc_credit_score_20210513.xlsx
+0
-0
test_case_data/bmc/bmc_illegal_study_20210513.xlsx
+0
-0
test_case_data/bmc/bmc_integral_20210513.xlsx
+0
-0
test_case_data/bmc/bmc_vehicle_steward_29_39_20210513.xlsx
+0
-0
No files found.
common/tools.py
View file @
fe83f8e5
...
...
@@ -9,6 +9,7 @@ from config import *
def
request_main
(
url
,
headers
,
method
,
data
,
has_token
=
False
):
"""封装requests的通用请求方法"""
res
=
None
url
=
url
.
strip
()
def
request_by_method
(
method
,
headers
):
inner_res
=
None
try
:
...
...
test_case/bmc/test_integral.py
View file @
fe83f8e5
...
...
@@ -59,14 +59,17 @@ class TestIntegral():
@pytest.mark.usefixtures
(
'test_pre_get_sign_integral'
)
@pytest.mark.parametrize
(
"inData"
,
get_excelData
(
workBook
,
'积分商城'
,
'postSignIntegral'
))
def
test_post_sign_integral
(
self
,
inData
,
test_pre_get_sign_integral
):
if
not
test_pre_get_sign_integral
:
pytest
.
skip
(
msg
=
"今天已经进行签到过,此用例不执行"
)
url
=
f
"{BMCConfig().host}{inData['url']}"
method
=
inData
[
'method'
]
req_data
=
inData
[
'reqData'
]
expectData
=
inData
[
'expectData'
]
headers
=
inData
[
'headers'
]
other_expected_data
=
inData
[
'otherExpectData'
]
res
=
request_main
(
url
=
url
,
headers
=
headers
,
method
=
method
,
data
=
req_data
,
has_token
=
False
)
if
not
test_pre_get_sign_integral
:
# 已经签到过
assert
res
[
'code'
]
==
other_expected_data
[
'code'
]
else
:
assert
res
[
'code'
]
==
expectData
[
'code'
]
@allure.story
(
"查询待领取积分清单"
)
...
...
test_case_data/bmc/bmc_credit_score_20210513.xlsx
View file @
fe83f8e5
No preview for this file type
test_case_data/bmc/bmc_illegal_study_20210513.xlsx
View file @
fe83f8e5
No preview for this file type
test_case_data/bmc/bmc_integral_20210513.xlsx
View file @
fe83f8e5
No preview for this file type
test_case_data/bmc/bmc_vehicle_steward_29_39_20210513.xlsx
View file @
fe83f8e5
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