Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jk_interface_test
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
huangqiang
jk_interface_test
Commits
31d2f8e5
Commit
31d2f8e5
authored
Apr 30, 2021
by
lanjiali
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
校区费用预警-查询
parent
afbc1bd1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
59 additions
and
57 deletions
+59
-57
workspace.xml
.idea/workspace.xml
+12
-4
run.py
run.py
+1
-1
test_demo.py
script/ji_yun_ying_pc/lanjiali_report/test_demo.py
+46
-52
test_school_expense.py
script/ji_yun_ying_pc/lanjiali_report/test_school_expense.py
+0
-0
No files found.
.idea/workspace.xml
View file @
31d2f8e5
...
@@ -19,10 +19,10 @@
...
@@ -19,10 +19,10 @@
<select
/>
<select
/>
</component>
</component>
<component
name=
"ChangeListManager"
>
<component
name=
"ChangeListManager"
>
<list
default=
"true"
id=
"54f4d37d-1724-4813-a1e2-24e200088c5f"
name=
"Default Changelist"
comment=
"
学生费用预警查询-分页
"
>
<list
default=
"true"
id=
"54f4d37d-1724-4813-a1e2-24e200088c5f"
name=
"Default Changelist"
comment=
"
校区费用预警-查询
"
>
<change
beforePath=
"$PROJECT_DIR$/.idea/workspace.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.idea/workspace.xml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/.idea/workspace.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.idea/workspace.xml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/run.py"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/run.py"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/run.py"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/run.py"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/script/ji_yun_ying_pc/lanjiali_report/
data_config/report_config.py"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/script/ji_yun_ying_pc/lanjiali_report/data_config/report_config
.py"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/script/ji_yun_ying_pc/lanjiali_report/
test_demo.py"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/script/ji_yun_ying_pc/lanjiali_report/test_demo
.py"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/script/ji_yun_ying_pc/lanjiali_report/test_school_expense.py"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/script/ji_yun_ying_pc/lanjiali_report/test_school_expense.py"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/script/ji_yun_ying_pc/lanjiali_report/test_school_expense.py"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/script/ji_yun_ying_pc/lanjiali_report/test_school_expense.py"
afterDir=
"false"
/>
</list>
</list>
<option
name=
"SHOW_DIALOG"
value=
"false"
/>
<option
name=
"SHOW_DIALOG"
value=
"false"
/>
...
@@ -255,7 +255,14 @@
...
@@ -255,7 +255,14 @@
<option
name=
"project"
value=
"LOCAL"
/>
<option
name=
"project"
value=
"LOCAL"
/>
<updated>
1619611092963
</updated>
<updated>
1619611092963
</updated>
</task>
</task>
<option
name=
"localTasksCounter"
value=
"10"
/>
<task
id=
"LOCAL-00010"
summary=
"校区费用预警-查询"
>
<created>
1619697582572
</created>
<option
name=
"number"
value=
"00010"
/>
<option
name=
"presentableId"
value=
"LOCAL-00010"
/>
<option
name=
"project"
value=
"LOCAL"
/>
<updated>
1619697582572
</updated>
</task>
<option
name=
"localTasksCounter"
value=
"11"
/>
<servers
/>
<servers
/>
</component>
</component>
<component
name=
"Vcs.Log.Tabs.Properties"
>
<component
name=
"Vcs.Log.Tabs.Properties"
>
...
@@ -279,7 +286,8 @@
...
@@ -279,7 +286,8 @@
<MESSAGE
value=
"学生费用预警查询-学生信息对比"
/>
<MESSAGE
value=
"学生费用预警查询-学生信息对比"
/>
<MESSAGE
value=
"校区费用预警查询"
/>
<MESSAGE
value=
"校区费用预警查询"
/>
<MESSAGE
value=
"学生费用预警查询-分页"
/>
<MESSAGE
value=
"学生费用预警查询-分页"
/>
<option
name=
"LAST_COMMIT_MESSAGE"
value=
"学生费用预警查询-分页"
/>
<MESSAGE
value=
"校区费用预警-查询"
/>
<option
name=
"LAST_COMMIT_MESSAGE"
value=
"校区费用预警-查询"
/>
</component>
</component>
<component
name=
"XDebuggerManager"
>
<component
name=
"XDebuggerManager"
>
<breakpoint-manager>
<breakpoint-manager>
...
...
run.py
View file @
31d2f8e5
...
@@ -3,7 +3,7 @@ import os
...
@@ -3,7 +3,7 @@ import os
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
run_config
=
[
run_config
=
[
"-s"
,
"./script/ji_yun_ying_pc/lanjiali_report/test_school_expense.py
::Test_select_school_expense_warning::test_schoolExtend_total
"
,
"-s"
,
"./script/ji_yun_ying_pc/lanjiali_report/test_school_expense.py"
,
"--alluredir"
,
"./report/xml"
,
"--alluredir"
,
"./report/xml"
,
"--host"
,
"http://192.168.32.31"
,
"--host"
,
"http://192.168.32.31"
,
"--account"
,
"b"
,
"--account"
,
"b"
,
...
...
script/ji_yun_ying_pc/lanjiali_report/test_demo.py
View file @
31d2f8e5
...
@@ -17,8 +17,8 @@ import pytest
...
@@ -17,8 +17,8 @@ import pytest
@allure.feature
(
"预警报表-学员费用预警查询"
)
@allure.feature
(
"预警报表-学员费用预警查询"
)
class
Test_select_student_expense
:
class
Test_select_student_expense
:
@allure.story
(
"学生费用预警查询"
)
@allure.story
(
"学生费用预警查询
-关键字查询
"
)
@allure.
step
(
"学生费用预警查询-关键字筛选"
)
@allure.
title
(
"学生费用预警查询-关键字筛选"
)
@pytest.mark.parametrize
(
"keyword"
,
keywords
)
@pytest.mark.parametrize
(
"keyword"
,
keywords
)
def
test_keywords_search
(
self
,
keyword
):
def
test_keywords_search
(
self
,
keyword
):
keyword_value
=
keyword
.
get
(
"keyword"
)
keyword_value
=
keyword
.
get
(
"keyword"
)
...
@@ -49,10 +49,8 @@ class Test_select_student_expense:
...
@@ -49,10 +49,8 @@ class Test_select_student_expense:
result
=
public_asserts
.
assert_res_field_equal_value
(
studentphone_list
,
keyword_value
)
result
=
public_asserts
.
assert_res_field_equal_value
(
studentphone_list
,
keyword_value
)
pytest
.
assume
(
result
)
pytest
.
assume
(
result
)
@allure.story
(
"学生费用预警查询-年份筛选"
)
@allure.step
(
"学生费用预警查询-年份筛选"
)
@pytest.mark.parametrize
(
"year"
,[
select_year
()])
@pytest.mark.parametrize
(
"year"
,[
select_year
()])
@allure.step
(
"学生费用预警查询-年份筛选"
)
def
test_year_screen
(
self
,
year
):
def
test_year_screen
(
self
,
year
):
data
=
{
data
=
{
"pageNum"
:
1
,
"pageNum"
:
1
,
...
@@ -68,10 +66,8 @@ class Test_select_student_expense:
...
@@ -68,10 +66,8 @@ class Test_select_student_expense:
result
=
public_asserts
.
assert_res_field_equal_value
(
years
,
year
)
result
=
public_asserts
.
assert_res_field_equal_value
(
years
,
year
)
pytest
.
assume
(
result
)
pytest
.
assume
(
result
)
@allure.story
(
'学生费用预警-期段筛选'
)
@allure.step
(
'学生费用预警-期段筛选'
)
@pytest.mark.parametrize
(
"term"
,[
select_term
()])
@pytest.mark.parametrize
(
"term"
,[
select_term
()])
@allure.step
(
"学生费用预警查询-期段筛选"
)
def
test_period_screen
(
self
,
term
):
def
test_period_screen
(
self
,
term
):
data
=
{
data
=
{
"pageNum"
:
1
,
"pageNum"
:
1
,
...
@@ -87,10 +83,8 @@ class Test_select_student_expense:
...
@@ -87,10 +83,8 @@ class Test_select_student_expense:
result
=
public_asserts
.
assert_res_field_equal_value
(
terms
,
term
)
result
=
public_asserts
.
assert_res_field_equal_value
(
terms
,
term
)
pytest
.
assume
(
result
)
pytest
.
assume
(
result
)
@allure.story
(
"学生费用预警-学生状态筛选"
)
@allure.step
(
"学生费用预警-学生状态筛选"
)
@pytest.mark.parametrize
(
"statuses"
,
student_statuses
)
@pytest.mark.parametrize
(
"statuses"
,
student_statuses
)
@allure.step
(
"学生费用预警查询-学生状态筛选"
)
def
test_student_status
(
self
,
statuses
):
def
test_student_status
(
self
,
statuses
):
status_value
=
statuses
[
'status'
]
status_value
=
statuses
[
'status'
]
status_meaning
=
statuses
[
'meaning'
]
status_meaning
=
statuses
[
'meaning'
]
...
@@ -118,9 +112,8 @@ class Test_select_student_expense:
...
@@ -118,9 +112,8 @@ class Test_select_student_expense:
result
=
public_asserts
.
assert_res_field_in_list
(
student_status
,
status_value
)
result
=
public_asserts
.
assert_res_field_in_list
(
student_status
,
status_value
)
pytest
.
assume
(
result
)
pytest
.
assume
(
result
)
@allure.st
ep
(
'学生费用预警-年级筛选'
)
@allure.st
ory
(
'学生费用预警-年级筛选'
)
@pytest.mark.parametrize
(
"grade"
,
grades
)
@pytest.mark.parametrize
(
"grade"
,
grades
)
@allure.step
(
"学生费用预警查询-年级筛选"
)
def
test_select_grade
(
self
,
grade
):
def
test_select_grade
(
self
,
grade
):
data
=
{
data
=
{
"pageNum"
:
1
,
"pageNum"
:
1
,
...
@@ -146,9 +139,8 @@ class Test_select_student_expense:
...
@@ -146,9 +139,8 @@ class Test_select_student_expense:
result
=
public_asserts
.
assert_res_field_equal_value
(
grade_list
,
'4年级'
)
result
=
public_asserts
.
assert_res_field_equal_value
(
grade_list
,
'4年级'
)
pytest
.
assume
(
result
)
pytest
.
assume
(
result
)
@allure.
step
(
'学生费用预警-学科筛选'
)
@allure.
title
(
'学生费用预警-学科筛选'
)
@pytest.mark.parametrize
(
"subject"
,
subjects
)
@pytest.mark.parametrize
(
"subject"
,
subjects
)
@allure.step
(
"学生费用预警查询-学科筛选"
)
def
test_select_subject
(
self
,
subject
):
def
test_select_subject
(
self
,
subject
):
data
=
{
data
=
{
"pageNum"
:
1
,
"pageNum"
:
1
,
...
@@ -178,9 +170,8 @@ class Test_select_student_expense:
...
@@ -178,9 +170,8 @@ class Test_select_student_expense:
result
=
public_asserts
.
assert_res_field_equal_value
(
subject_list
,
subject
)
result
=
public_asserts
.
assert_res_field_equal_value
(
subject_list
,
subject
)
pytest
.
assume
(
result
)
pytest
.
assume
(
result
)
@allure.st
ep
(
"学生费用预警-班型筛选"
)
@allure.st
ory
(
"学生费用预警-班型筛选"
)
@pytest.mark.parametrize
(
"class_types"
,
classTypes
)
@pytest.mark.parametrize
(
"class_types"
,
classTypes
)
@allure.step
(
"学生费用预警查询-班型筛选"
)
def
test_select_classTypes
(
self
,
class_types
):
def
test_select_classTypes
(
self
,
class_types
):
class_types_value
=
class_types
[
'classType'
]
class_types_value
=
class_types
[
'classType'
]
classtype_name
=
class_types
[
'classType_name'
]
classtype_name
=
class_types
[
'classType_name'
]
...
@@ -214,8 +205,7 @@ class Test_select_student_expense:
...
@@ -214,8 +205,7 @@ class Test_select_student_expense:
pytest
.
assume
(
result
)
pytest
.
assume
(
result
)
@allure.step
(
"学生费用预警-组合筛选"
)
@allure.story
(
"学生费用预警-组合筛选"
)
@allure.step
(
"学生费用预警查询-组合筛选"
)
def
test_select_all
(
self
):
def
test_select_all
(
self
):
data
=
{
data
=
{
"pageSize"
:
10
,
"pageSize"
:
10
,
...
@@ -230,37 +220,41 @@ class Test_select_student_expense:
...
@@ -230,37 +220,41 @@ class Test_select_student_expense:
"schoolAreaIds"
:
school_areas
"schoolAreaIds"
:
school_areas
}
}
res
=
report_finance_student_expense_warning_post
(
header
=
jyy_header
,
body
=
data
)
res
=
report_finance_student_expense_warning_post
(
header
=
jyy_header
,
body
=
data
)
#校验名字
if
res
[
'data'
][
'list'
]
==
[]:
studentName_list
=
jsonpath
.
jsonpath
(
res
,
"$.data.list..studentName"
)
assert
res
[
'msg'
]
==
'成功'
keyword_res
=
public_asserts
.
assert_res_field_contain_value
(
studentName_list
,
'蓝'
)
assert
res
[
'code'
]
==
0
pytest
.
assume
(
keyword_res
)
else
:
#校验学生状态
#校验名字
studentStatuse_list
=
jsonpath
.
jsonpath
(
res
,
"$.data.list..studentStatus"
)
studentName_list
=
jsonpath
.
jsonpath
(
res
,
"$.data.list..studentName"
)
statue_res
=
public_asserts
.
assert_res_field_in_list
(
studentStatuse_list
,[
1110
])
keyword_res
=
public_asserts
.
assert_res_field_contain_value
(
studentName_list
,
'蓝'
)
pytest
.
assume
(
statue_res
)
pytest
.
assume
(
keyword_res
)
#校验年份
#校验学生状态
year_list
=
jsonpath
.
jsonpath
(
res
,
"$.data.list..year"
)
studentStatuse_list
=
jsonpath
.
jsonpath
(
res
,
"$.data.list..studentStatus"
)
year_res
=
public_asserts
.
assert_res_field_equal_value
(
year_list
,
'2021'
)
statue_res
=
public_asserts
.
assert_res_field_in_list
(
studentStatuse_list
,[
1110
])
pytest
.
assume
(
year_res
)
pytest
.
assume
(
statue_res
)
#校验期段
#校验年份
term_list
=
jsonpath
.
jsonpath
(
res
,
"$.data.list..term"
)
year_list
=
jsonpath
.
jsonpath
(
res
,
"$.data.list..year"
)
term_res
=
public_asserts
.
assert_res_field_in_list
(
term_list
,
[
'春'
])
year_res
=
public_asserts
.
assert_res_field_equal_value
(
year_list
,
'2021'
)
pytest
.
assume
(
term_res
)
pytest
.
assume
(
year_res
)
#校验学科
#校验期段
subjects_list
=
jsonpath
.
jsonpath
(
res
,
"$.data.list..subject"
)
term_list
=
jsonpath
.
jsonpath
(
res
,
"$.data.list..term"
)
subjects_res
=
public_asserts
.
assert_res_field_equal_value
(
subjects_list
,
'数学'
)
term_res
=
public_asserts
.
assert_res_field_in_list
(
term_list
,
[
'春'
])
pytest
.
assume
(
subjects_res
)
pytest
.
assume
(
term_res
)
#校验年级
#校验学科
grade_list
=
jsonpath
.
jsonpath
(
res
,
"$.data.list..grade"
)
subjects_list
=
jsonpath
.
jsonpath
(
res
,
"$.data.list..subject"
)
grade_res
=
public_asserts
.
assert_res_field_equal_value
(
grade_list
,
'3年级'
)
subjects_res
=
public_asserts
.
assert_res_field_equal_value
(
subjects_list
,
'数学'
)
pytest
.
assume
(
grade_res
)
pytest
.
assume
(
subjects_res
)
# 校验班型
#校验年级
classType_list
=
jsonpath
.
jsonpath
(
res
,
"$.data.list..classType"
)
grade_list
=
jsonpath
.
jsonpath
(
res
,
"$.data.list..grade"
)
classType_res
=
public_asserts
.
assert_res_field_equal_value
(
classType_list
,
'极趣班'
)
grade_res
=
public_asserts
.
assert_res_field_equal_value
(
grade_list
,
'3年级'
)
pytest
.
assume
(
classType_res
)
pytest
.
assume
(
grade_res
)
# 校验班型
classType_list
=
jsonpath
.
jsonpath
(
res
,
"$.data.list..classType"
)
@allure.step
(
"学生费用预警-列表数据汇总"
)
classType_res
=
public_asserts
.
assert_res_field_equal_value
(
classType_list
,
'极趣班'
)
pytest
.
assume
(
classType_res
)
@allure.story
(
"学生费用预警-列表数据汇总"
)
def
test_studentExtend_total
(
self
):
def
test_studentExtend_total
(
self
):
data
=
{
data
=
{
...
@@ -356,7 +350,7 @@ class Test_select_student_expense:
...
@@ -356,7 +350,7 @@ class Test_select_student_expense:
assert
round
(
total_remainAmount
[
0
],
2
)
==
sum_remainAmount
assert
round
(
total_remainAmount
[
0
],
2
)
==
sum_remainAmount
@allure.st
ep
(
"学生费用预警-查看学生信息"
)
@allure.st
ory
(
"学生费用预警-查看学生信息"
)
def
test_select_stuinfo
(
self
):
def
test_select_stuinfo
(
self
):
data
=
{
data
=
{
"pageNum"
:
1
,
"pageNum"
:
1
,
...
@@ -378,7 +372,7 @@ class Test_select_student_expense:
...
@@ -378,7 +372,7 @@ class Test_select_student_expense:
student_name
=
student_res
[
'data'
][
'studentName'
]
student_name
=
student_res
[
'data'
][
'studentName'
]
assert
studentname_list
[
0
]
==
student_name
assert
studentname_list
[
0
]
==
student_name
@allure.st
ep
(
"学生费用预警-分页
"
)
@allure.st
ory
(
"学生费用预警-分页判断
"
)
def
test_page
(
self
):
def
test_page
(
self
):
data
=
{
data
=
{
"pageNum"
:
1
,
"pageNum"
:
1
,
...
...
script/ji_yun_ying_pc/lanjiali_report/test_school_expense.py
View file @
31d2f8e5
This diff is collapsed.
Click to expand it.
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