Commit d92abd02 authored by lanjiali's avatar lanjiali

学生费用预警查询

parent bc7885aa
...@@ -20,26 +20,7 @@ ...@@ -20,26 +20,7 @@
</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$/report/xml/0a9a9396-c2f6-4bee-ad80-415195b22e49-result.json" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/report/xml/2ba7635c-a923-4ab2-b7f8-9580e63eb8b3-attachment.json" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/report/xml/307f5007-2ef3-4d51-8179-66d95f86600f-container.json" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/report/xml/3f18c4b4-ee2d-4907-bbe5-39a7de727f22-attachment.json" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/report/xml/6e9fef3e-d23f-449c-bf80-7b1495c15cc0-attachment.json" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/report/xml/73a8ab84-2f12-4cda-a519-4ad030346d0b-result.json" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/report/xml/9111ab00-6e2e-43e8-a1ae-bd17d312f15d-container.json" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/report/xml/92ed7752-9a57-420a-9bb0-322e9240842f-result.json" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/report/xml/9b9a1cfb-a4d5-4149-9961-cd2ad10670f4-result.json" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/report/xml/a631f938-e8b6-41ae-b29f-0deacb928652-container.json" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/report/xml/b6f95a56-d09d-4e41-9522-09b4bf2e201a-attachment.json" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/report/xml/c1832976-7ac2-4e1d-ae39-d3d1a649f552-container.json" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/report/xml/c30faab2-5f74-4ed0-bd5f-8dcc276fb57d-container.json" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/report/xml/ce14be75-53d0-45aa-8e37-b38a09de86c7-container.json" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/report/xml/eb8d0292-a347-44e2-b0ae-711ef8147990-container.json" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/report/xml/f7a1f6a6-70d7-4eaa-b527-31c3a13d5960-attachment.json" beforeDir="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_demo.py" beforeDir="false" afterPath="$PROJECT_DIR$/script/ji_yun_ying_pc/lanjiali_report/test_demo.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/script/public_asserts.py" beforeDir="false" afterPath="$PROJECT_DIR$/script/public_asserts.py" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
...@@ -236,7 +217,14 @@ ...@@ -236,7 +217,14 @@
<option name="project" value="LOCAL" /> <option name="project" value="LOCAL" />
<updated>1618969030840</updated> <updated>1618969030840</updated>
</task> </task>
<option name="localTasksCounter" value="5" /> <task id="LOCAL-00005" summary="关键字查询">
<created>1619436346922</created>
<option name="number" value="00005" />
<option name="presentableId" value="LOCAL-00005" />
<option name="project" value="LOCAL" />
<updated>1619436346922</updated>
</task>
<option name="localTasksCounter" value="6" />
<servers /> <servers />
</component> </component>
<component name="Vcs.Log.Tabs.Properties"> <component name="Vcs.Log.Tabs.Properties">
......
...@@ -20,249 +20,247 @@ import pytest ...@@ -20,249 +20,247 @@ import pytest
class Test_select_student_expense: class Test_select_student_expense:
@allure.story("学生费用预警查询") @allure.story("学生费用预警查询")
#暂不执行 @allure.step("学生费用预警查询-关键字筛选")
# @pytest.mark.skip(reason="调试中,这个测试用例暂时不执行") @pytest.mark.parametrize("keyword", keywords)
# @allure.step("学生费用预警查询-关键字筛选") def test_keywords_search(self,keyword):
# @pytest.mark.parametrize("keyword", keywords) keyword_value = keyword.get("keyword")
# def test_keywords_search(self,keyword): #关键字查询类型
# keyword_value = keyword.get("keyword") keyword_type = keyword.get("keyword_type")
# #关键字查询类型 data = {
# keyword_type = keyword.get("keyword_type") "pageNum": 1,
# data = { "pageSize": 10,
# "pageNum": 1, "studentStatuses": [1110],
# "pageSize": 10, "year": 2021,
# "studentStatuses": [1110], "keyword": keyword_value,
# "year": 2021, "term": "春",
# "keyword": keyword_value, "schoolAreaIds": school_areas
# "term": "春", }
# "schoolAreaIds": school_areas res = report_finance_student_expense_warning_post(body=data ,header=jyy_header )
# } if keyword_type == "studentName":
# res = report_finance_student_expense_warning_post(body=data ,header=jyy_header ) student_names = jsonpath.jsonpath(res, "$.data.list..studentName")
# if keyword_type == "studentName": result = public_asserts.assert_res_field_contain_value(student_names, keyword_value)
# student_names = jsonpath.jsonpath(res, "$.data.list..studentName") pytest.assume(result)
# result = public_asserts.assert_res_field_contain_value(student_names, keyword_value) elif keyword_type == 'studentNo':
# pytest.assume(result) student_NO = jsonpath.jsonpath(res,"$.data.list..studentNo")
# elif keyword_type == 'studentNo': result = public_asserts.assert_res_field_equal_value(student_NO,keyword_value)
# student_NO = jsonpath.jsonpath(res,"$.data.list..studentNo") pytest.assume(result)
# result = public_asserts.assert_res_field_equal_value(student_NO,keyword_value) elif keyword_type == "phone":
# pytest.assume(result) student_id = jsonpath.jsonpath(res,"$.data.list..studentId")
# elif keyword_type == "phone": # 调用查询返回的学生id下的学生手机号
# student_id = jsonpath.jsonpath(res,"$.data.list..studentId") studentphone_list = select_student_phone(student_id)
# # 调用查询返回的学生id下的学生手机号 result = public_asserts.assert_res_field_equal_value(studentphone_list,keyword_value)
# studentphone_list = select_student_phone(student_id) pytest.assume(result)
# result = public_asserts.assert_res_field_equal_value(studentphone_list,keyword_value)
# pytest.assume(result)
# @allure.step("学生费用预警查询-年份筛选")
# @pytest.mark.parametrize("year",[select_year()])
# @allure.step("学生费用预警查询-年份筛选") @allure.step("学生费用预警查询-年份筛选")
# @pytest.mark.parametrize("year",[select_year()]) def test_year_screen(self,year):
# @allure.step("学生费用预警查询-年份筛选") data = {
# def test_year_screen(self,year): "pageNum": 1,
# data = { "pageSize": 10,
# "pageNum": 1, "studentStatuses": [1110],
# "pageSize": 10, "year": year,
# "studentStatuses": [1110], "keyword": '蓝',
# "year": year, "term": "春",
# "keyword": '蓝', "schoolAreaIds": school_areas
# "term": "春", }
# "schoolAreaIds": school_areas res = report_finance_student_expense_warning_post(header = jyy_header,body = data)
# } years = jsonpath.jsonpath(res,"$.data.list..year")
# res = report_finance_student_expense_warning_post(header = jyy_header,body = data) result = public_asserts.assert_res_field_equal_value(years,year)
# years = jsonpath.jsonpath(res,"$.data.list..year") pytest.assume(result)
# result = public_asserts.assert_res_field_equal_value(years,year)
# pytest.assume(result)
# @allure.step('学生费用预警-期段筛选')
# @pytest.mark.parametrize( "term",[select_term()])
# @allure.step('学生费用预警-期段筛选') @allure.step("学生费用预警查询-期段筛选")
# @pytest.mark.parametrize( "term",[select_term()]) def test_period_screen(self,term):
# @allure.step("学生费用预警查询-期段筛选") data = {
# def test_period_screen(self,term): "pageNum": 1,
# data = { "pageSize": 10,
# "pageNum": 1, "studentStatuses": [1110],
# "pageSize": 10, "year": 2021,
# "studentStatuses": [1110], "keyword": '蓝',
# "year": 2021, "term": term,
# "keyword": '蓝', "schoolAreaIds": school_areas
# "term": term, }
# "schoolAreaIds": school_areas res = report_finance_student_expense_warning_post(header=jyy_header, body=data)
# } terms = jsonpath.jsonpath(res,"$.data.list..term")
# res = report_finance_student_expense_warning_post(header=jyy_header, body=data) result = public_asserts.assert_res_field_equal_value(terms,term)
# terms = jsonpath.jsonpath(res,"$.data.list..term") pytest.assume(result)
# result = public_asserts.assert_res_field_equal_value(terms,term)
# pytest.assume(result)
# @allure.step("学生费用预警-学生状态筛选")
# @pytest.mark.parametrize("statuses",student_statuses)
# @allure.step("学生费用预警-学生状态筛选") @allure.step("学生费用预警查询-学生状态筛选")
# @pytest.mark.parametrize("statuses",student_statuses) def test_student_status(self,statuses):
# @allure.step("学生费用预警查询-学生状态筛选") status_value = statuses['status']
# def test_student_status(self,statuses): status_meaning = statuses['meaning']
# status_value = statuses['status'] data = {
# status_meaning = statuses['meaning'] "pageNum": 1,
# data = { "pageSize": 10,
# "pageNum": 1, "studentStatuses": status_value,
# "pageSize": 10, "year": select_year(),
# "studentStatuses": status_value, "keyword": '蓝',
# "year": select_year(), "term": select_term(),
# "keyword": '蓝', "schoolAreaIds": school_areas
# "term": select_term(), }
# "schoolAreaIds": school_areas res = report_finance_student_expense_warning_post(header= jyy_header, body= data)
# } student_status = jsonpath.jsonpath(res,"$.data.list..studentStatus")
# res = report_finance_student_expense_warning_post(header= jyy_header, body= data) if status_meaning == '在读学员':
# student_status = jsonpath.jsonpath(res,"$.data.list..studentStatus") result = public_asserts.assert_res_field_in_list(student_status,status_value)
# if status_meaning == '在读学员': pytest.assume(result)
# result = public_asserts.assert_res_field_in_list(student_status,status_value) elif status_meaning == '结业学员':
# pytest.assume(result) result = public_asserts.assert_res_field_in_list(student_status, status_value)
# elif status_meaning == '结业学员': pytest.assume(result)
# result = public_asserts.assert_res_field_in_list(student_status, status_value) elif status_meaning == '出班学员':
# pytest.assume(result) result = public_asserts.assert_res_field_in_list(student_status, status_value)
# elif status_meaning == '出班学员': pytest.assume(result)
# result = public_asserts.assert_res_field_in_list(student_status, status_value) elif status_meaning == '全部学员':
# pytest.assume(result) result = public_asserts.assert_res_field_in_list(student_status, status_value)
# elif status_meaning == '全部学员': pytest.assume(result)
# result = public_asserts.assert_res_field_in_list(student_status, status_value)
# pytest.assume(result) @allure.step('学生费用预警-年级筛选')
# @pytest.mark.parametrize("grade",grades)
# @allure.step('学生费用预警-年级筛选') @allure.step("学生费用预警查询-年级筛选")
# @pytest.mark.parametrize("grade",grades) def test_select_grade(self,grade):
# @allure.step("学生费用预警查询-年级筛选") data = {
# def test_select_grade(self,grade): "pageNum": 1,
# data = { "pageSize": 10,
# "pageNum": 1, "studentStatuses": [1110],
# "pageSize": 10, "year": select_year(),
# "studentStatuses": [1110], "term": select_term(),
# "year": select_year(), "schoolAreaIds": school_areas,
# "term": select_term(), "grades": [grade]
# "schoolAreaIds": school_areas, }
# "grades": [grade] res = report_finance_student_expense_warning_post(header= jyy_header,body= data)
# } grade_list = jsonpath.jsonpath(res,"$.data.list..grade")
# res = report_finance_student_expense_warning_post(header= jyy_header,body= data) if grade == '一年级':
# grade_list = jsonpath.jsonpath(res,"$.data.list..grade") result = public_asserts.assert_res_field_equal_value(grade_list,'1年级')
# if grade == '一年级': pytest.assume(result)
# result = public_asserts.assert_res_field_equal_value(grade_list,'1年级') elif grade == '二年级':
# pytest.assume(result) result = public_asserts.assert_res_field_equal_value(grade_list,'2年级')
# elif grade == '二年级': pytest.assume(result)
# result = public_asserts.assert_res_field_equal_value(grade_list,'2年级') elif grade == '三年级':
# pytest.assume(result) result = public_asserts.assert_res_field_equal_value(grade_list,'3年级')
# elif grade == '三年级': pytest.assume(result)
# result = public_asserts.assert_res_field_equal_value(grade_list,'3年级') elif grade == '四年级':
# pytest.assume(result) result = public_asserts.assert_res_field_equal_value(grade_list,'4年级')
# elif grade == '四年级': pytest.assume(result)
# result = public_asserts.assert_res_field_equal_value(grade_list,'4年级')
# pytest.assume(result) @allure.step('学生费用预警-学科筛选')
# @pytest.mark.parametrize("subject", subjects)
# @allure.step('学生费用预警-学科筛选') @allure.step("学生费用预警查询-学科筛选")
# @pytest.mark.parametrize("subject", subjects) def test_select_subject(self,subject):
# @allure.step("学生费用预警查询-学科筛选") data = {
# def test_select_subject(self,subject): "pageNum": 1,
# data = { "pageSize": 10,
# "pageNum": 1, "studentStatuses": [1110],
# "pageSize": 10, "year": select_year(),
# "studentStatuses": [1110], "term": select_term(),
# "year": select_year(), "schoolAreaIds": school_areas,
# "term": select_term(), "grades": ['一年级','九年级'],
# "schoolAreaIds": school_areas, "subjects": [subject]
# "grades": ['一年级','九年级'], }
# "subjects": [subject] res = report_finance_student_expense_warning_post(header=jyy_header, body=data)
# } subject_list = jsonpath.jsonpath(res,'$.data.list..subject')
# res = report_finance_student_expense_warning_post(header=jyy_header, body=data) if subject == '语文':
# subject_list = jsonpath.jsonpath(res,'$.data.list..subject') result = public_asserts.assert_res_field_equal_value(subject_list,subject)
# if subject == '语文': pytest.assume(result)
# result = public_asserts.assert_res_field_equal_value(subject_list,subject) elif subject == '英语':
# pytest.assume(result) result = public_asserts.assert_res_field_equal_value(subject_list,subject)
# elif subject == '英语': pytest.assume(result)
# result = public_asserts.assert_res_field_equal_value(subject_list,subject) elif subject == '物理':
# pytest.assume(result) result = public_asserts.assert_res_field_equal_value(subject_list,subject)
# elif subject == '物理': pytest.assume(result)
# result = public_asserts.assert_res_field_equal_value(subject_list,subject) elif subject == '数学':
# pytest.assume(result) result = public_asserts.assert_res_field_equal_value(subject_list,subject)
# elif subject == '数学': pytest.assume(result)
# result = public_asserts.assert_res_field_equal_value(subject_list,subject) elif subject == '化学':
# pytest.assume(result) result = public_asserts.assert_res_field_equal_value(subject_list,subject)
# elif subject == '化学': pytest.assume(result)
# result = public_asserts.assert_res_field_equal_value(subject_list,subject)
# pytest.assume(result) @allure.step("学生费用预警-班型筛选")
# @pytest.mark.parametrize("class_types",classTypes)
# @allure.step("学生费用预警-班型筛选") @allure.step("学生费用预警查询-班型筛选")
# @pytest.mark.parametrize("class_types",classTypes) def test_select_classTypes(self,class_types):
# @allure.step("学生费用预警查询-班型筛选") class_types_value = class_types['classType']
# def test_select_classTypes(self,class_types): classtype_name = class_types['classType_name']
# class_types_value = class_types['classType'] data = {
# classtype_name = class_types['classType_name'] "pageSize": 10,
# data = { "pageNum": 1,
# "pageSize": 10, "studentStatuses": [1110],
# "pageNum": 1, "year": 2021,
# "studentStatuses": [1110], "term": "春",
# "year": 2021, "subjects": ["数学", "语文"],
# "term": "春", "grades": ["三年级"],
# "subjects": ["数学", "语文"], "classTypes": class_types_value,
# "grades": ["三年级"], "schoolAreaIds": school_areas
# "classTypes": class_types_value, }
# "schoolAreaIds": school_areas res = report_finance_student_expense_warning_post(header=jyy_header, body=data)
# } class_type_list = jsonpath.jsonpath(res,"$.data.list..classType")
# res = report_finance_student_expense_warning_post(header=jyy_header, body=data) if classtype_name == '常规班课':
# class_type_list = jsonpath.jsonpath(res,"$.data.list..classType") result = public_asserts.assert_res_field_in_list(class_type_list,class_types_value)
# if classtype_name == '常规班课': pytest.assume(result)
# result = public_asserts.assert_res_field_in_list(class_type_list,class_types_value) elif classtype_name == '精品定制课':
# pytest.assume(result) result = public_asserts.assert_res_field_in_list(class_type_list, class_types_value)
# elif classtype_name == '精品定制课': pytest.assume(result)
# result = public_asserts.assert_res_field_in_list(class_type_list, class_types_value) elif classtype_name == '集训班课':
# pytest.assume(result) result = public_asserts.assert_res_field_in_list(class_type_list, class_types_value)
# elif classtype_name == '集训班课': pytest.assume(result)
# result = public_asserts.assert_res_field_in_list(class_type_list, class_types_value) elif classtype_name == '专题班课':
# pytest.assume(result) result = public_asserts.assert_res_field_in_list(class_type_list, class_types_value)
# elif classtype_name == '专题班课': pytest.assume(result)
# result = public_asserts.assert_res_field_in_list(class_type_list, class_types_value) elif classtype_name == '服务班课':
# pytest.assume(result) result = public_asserts.assert_res_field_in_list(class_type_list, class_types_value)
# elif classtype_name == '服务班课': pytest.assume(result)
# result = public_asserts.assert_res_field_in_list(class_type_list, class_types_value)
# pytest.assume(result)
# @allure.step("学生费用预警-组合筛选")
# @allure.step("学生费用预警查询-组合筛选")
# @allure.step("学生费用预警-组合筛选") def test_select_classTypes(self):
# @allure.step("学生费用预警查询-组合筛选") data = {
# def test_select_classTypes(self): "pageSize": 10,
# data = { "pageNum": 1,
# "pageSize": 10, "studentStatuses": [1110],
# "pageNum": 1, "keyword": '蓝',
# "studentStatuses": [1110], "year": 2021,
# "keyword": '蓝', "term": "春",
# "year": 2021, "subjects": ["数学"],
# "term": "春", "grades": ["三年级"],
# "subjects": ["数学"], "classTypes": ["极趣班"],
# "grades": ["三年级"], "schoolAreaIds": school_areas
# "classTypes": ["极趣班"], }
# "schoolAreaIds": school_areas res = report_finance_student_expense_warning_post(header= jyy_header,body= data)
# } print(res)
# res = report_finance_student_expense_warning_post(header= jyy_header,body= data) #校验名字
# print(res) studentName_list = jsonpath.jsonpath(res,"$.data.list..studentName")
# #校验名字 keyword_res = public_asserts.assert_res_field_contain_value(studentName_list,'蓝')
# studentName_list = jsonpath.jsonpath(res,"$.data.list..studentName") pytest.assume(keyword_res)
# keyword_res = public_asserts.assert_res_field_contain_value(studentName_list,'蓝') #校验学生状态
# pytest.assume(keyword_res) studentStatuse_list = jsonpath.jsonpath(res,"$.data.list..studentStatus")
# #校验学生状态 statue_res = public_asserts.assert_res_field_in_list(studentStatuse_list,[1110])
# studentStatuse_list = jsonpath.jsonpath(res,"$.data.list..studentStatus") pytest.assume(statue_res)
# statue_res = public_asserts.assert_res_field_in_list(studentStatuse_list,[1110]) #校验年份
# pytest.assume(statue_res) year_list = jsonpath.jsonpath(res,"$.data.list..year")
# #校验年份 year_res = public_asserts.assert_res_field_equal_value(year_list,'2021')
# year_list = jsonpath.jsonpath(res,"$.data.list..year") pytest.assume(year_res)
# year_res = public_asserts.assert_res_field_equal_value(year_list,'2021') #校验期段
# pytest.assume(year_res) term_list = jsonpath.jsonpath(res, "$.data.list..term")
# #校验期段 term_res = public_asserts.assert_res_field_in_list(term_list, ['春'])
# term_list = jsonpath.jsonpath(res, "$.data.list..term") pytest.assume(term_res)
# term_res = public_asserts.assert_res_field_in_list(term_list, ['春']) #校验学科
# pytest.assume(term_res) subjects_list = jsonpath.jsonpath(res, "$.data.list..subject")
# #校验学科 subjects_res = public_asserts.assert_res_field_equal_value(subjects_list, '数学')
# subjects_list = jsonpath.jsonpath(res, "$.data.list..subject") pytest.assume(subjects_res)
# subjects_res = public_asserts.assert_res_field_equal_value(subjects_list, '数学') #校验年级
# pytest.assume(subjects_res) grade_list = jsonpath.jsonpath(res, "$.data.list..grade")
# #校验年级 grade_res = public_asserts.assert_res_field_equal_value(grade_list, '3年级')
# grade_list = jsonpath.jsonpath(res, "$.data.list..grade") pytest.assume(grade_res)
# grade_res = public_asserts.assert_res_field_equal_value(grade_list, '3年级') # 校验班型
# pytest.assume(grade_res) classType_list = jsonpath.jsonpath(res, "$.data.list..classType")
# # 校验班型 classType_res = public_asserts.assert_res_field_equal_value(classType_list, '极趣班')
# classType_list = jsonpath.jsonpath(res, "$.data.list..classType") pytest.assume(classType_res)
# classType_res = public_asserts.assert_res_field_equal_value(classType_list, '极趣班')
# pytest.assume(classType_res)
@allure.step("学生费用预警-列表数据汇总") @allure.step("学生费用预警-列表数据汇总")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment