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
12e2fdb3
Commit
12e2fdb3
authored
May 18, 2021
by
fanxun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
用例拆解
parent
91e50021
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
8 additions
and
7 deletions
+8
-7
test_case/bmc/test_illegalstudy.py
+8
-7
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_testcase01_20210513.xlsx
+0
-0
test_case_data/bmc/bmc_vehicle_steward_29_39_20210513.xlsx
+0
-0
No files found.
test_case/bmc/test_illegalstudy.py
View file @
12e2fdb3
...
@@ -43,12 +43,13 @@ class TestCreditScore():
...
@@ -43,12 +43,13 @@ class TestCreditScore():
@allure.description
(
"/paper/getPaper"
)
@allure.description
(
"/paper/getPaper"
)
@allure.title
(
"{inData[testPoint]}"
)
@allure.title
(
"{inData[testPoint]}"
)
@pytest.mark.parametrize
(
"inData"
,
get_excelData
(
workBook
,
'三车违法学习'
,
'getPaperIllegalstudy'
))
@pytest.mark.parametrize
(
"inData"
,
get_excelData
(
workBook
,
'三车违法学习'
,
'getPaperIllegalstudy'
))
def
test_get
PaperIllegal
study
(
self
,
inData
):
def
test_get
_paper_illegal_
study
(
self
,
inData
):
url
=
f
"{BMCConfig().host}{inData['url']}"
url
=
f
"{BMCConfig().host}{inData['url']}"
method
=
inData
[
'method'
]
method
=
inData
[
'method'
]
req_data
=
inData
[
'reqData'
]
req_data
=
inData
[
'reqData'
]
expectData
=
inData
[
'expectData'
]
expectData
=
inData
[
'expectData'
]
res
=
request_main
(
url
=
url
,
headers
=
None
,
method
=
method
,
data
=
req_data
,
has_token
=
True
)
headers
=
inData
[
'headers'
]
res
=
request_main
(
url
=
url
,
headers
=
headers
,
method
=
method
,
data
=
req_data
,
has_token
=
False
)
assert
res
[
'code'
]
==
expectData
[
'code'
]
assert
res
[
'code'
]
==
expectData
[
'code'
]
@pytest.fixture
()
@pytest.fixture
()
...
@@ -57,7 +58,7 @@ class TestCreditScore():
...
@@ -57,7 +58,7 @@ class TestCreditScore():
url
=
f
"{BMCConfig().host}/paper/getPaper"
url
=
f
"{BMCConfig().host}/paper/getPaper"
method
=
'get'
method
=
'get'
req_data
=
None
req_data
=
None
res
=
request_main
(
url
=
url
,
headers
=
None
,
method
=
method
,
data
=
req_data
,
has_token
=
Tru
e
)
res
=
request_main
(
url
=
url
,
headers
=
None
,
method
=
method
,
data
=
req_data
,
has_token
=
Fals
e
)
topic_lists
=
res
[
'data'
][
'topicList'
]
topic_lists
=
res
[
'data'
][
'topicList'
]
browsequestion
=
{}
browsequestion
=
{}
...
@@ -85,9 +86,9 @@ class TestCreditScore():
...
@@ -85,9 +86,9 @@ class TestCreditScore():
url
=
f
"{BMCConfig().host}{inData['url']}"
url
=
f
"{BMCConfig().host}{inData['url']}"
method
=
inData
[
'method'
]
method
=
inData
[
'method'
]
req_data
=
inData
[
'reqData'
]
req_data
=
inData
[
'reqData'
]
req_data
[
'answerId'
]
=
self
.
self
.
browsequestion
[
'answerId'
]
req_data
[
'answerId'
]
=
browsequestion
[
'answerId'
]
req_data
[
'topicId'
]
=
self
.
browsequestion
[
'topicId'
]
req_data
[
'topicId'
]
=
browsequestion
[
'topicId'
]
req_data
[
'topicType'
]
=
self
.
browsequestion
[
'topicType'
]
req_data
[
'topicType'
]
=
browsequestion
[
'topicType'
]
expectData
=
inData
[
'expectData'
]
expectData
=
inData
[
'expectData'
]
case_num
=
inData
[
'caseNum'
]
case_num
=
inData
[
'caseNum'
]
if
case_num
==
'submitAnswerIllegalstudy001'
:
if
case_num
==
'submitAnswerIllegalstudy001'
:
...
@@ -115,7 +116,7 @@ class TestCreditScore():
...
@@ -115,7 +116,7 @@ class TestCreditScore():
req_data
[
'answerId'
]
=
choosequestion
[
'answerId'
]
req_data
[
'answerId'
]
=
choosequestion
[
'answerId'
]
req_data
[
'topicId'
]
=
choosequestion
[
'topicId'
]
req_data
[
'topicId'
]
=
choosequestion
[
'topicId'
]
res
=
request_main
(
url
=
url
,
headers
=
None
,
method
=
method
,
data
=
req_data
,
has_token
=
Tru
e
)
res
=
request_main
(
url
=
url
,
headers
=
None
,
method
=
method
,
data
=
req_data
,
has_token
=
Fals
e
)
assert
res
[
'code'
]
==
expectData
[
'code'
]
assert
res
[
'code'
]
==
expectData
[
'code'
]
# @allure.story("查询成绩(只有错题)")
# @allure.story("查询成绩(只有错题)")
...
...
test_case_data/bmc/bmc_credit_score_20210513.xlsx
0 → 100644
View file @
12e2fdb3
File added
test_case_data/bmc/bmc_illegal_study_20210513.xlsx
0 → 100644
View file @
12e2fdb3
File added
test_case_data/bmc/bmc_integral_20210513.xlsx
0 → 100644
View file @
12e2fdb3
File added
test_case_data/bmc/bmc_testcase01_20210513.xlsx
View file @
12e2fdb3
No preview for this file type
test_case_data/bmc/bmc_vehicle_steward_29_39_20210513.xlsx
0 → 100644
View file @
12e2fdb3
File added
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