Commit 31d2f8e5 authored by lanjiali's avatar lanjiali

校区费用预警-查询

parent afbc1bd1
......@@ -19,10 +19,10 @@
<select />
</component>
<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$/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" />
</list>
<option name="SHOW_DIALOG" value="false" />
......@@ -255,7 +255,14 @@
<option name="project" value="LOCAL" />
<updated>1619611092963</updated>
</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 />
</component>
<component name="Vcs.Log.Tabs.Properties">
......@@ -279,7 +286,8 @@
<MESSAGE value="学生费用预警查询-学生信息对比" />
<MESSAGE value="校区费用预警查询" />
<MESSAGE value="学生费用预警查询-分页" />
<option name="LAST_COMMIT_MESSAGE" value="学生费用预警查询-分页" />
<MESSAGE value="校区费用预警-查询" />
<option name="LAST_COMMIT_MESSAGE" value="校区费用预警-查询" />
</component>
<component name="XDebuggerManager">
<breakpoint-manager>
......
......@@ -3,7 +3,7 @@ import os
if __name__ == '__main__':
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",
"--host", "http://192.168.32.31",
"--account", "b",
......
......@@ -17,8 +17,8 @@ import pytest
@allure.feature("预警报表-学员费用预警查询")
class Test_select_student_expense:
@allure.story("学生费用预警查询")
@allure.step("学生费用预警查询-关键字筛选")
@allure.story("学生费用预警查询-关键字查询")
@allure.title("学生费用预警查询-关键字筛选")
@pytest.mark.parametrize("keyword", keywords)
def test_keywords_search(self,keyword):
keyword_value = keyword.get("keyword")
......@@ -49,10 +49,8 @@ class Test_select_student_expense:
result = public_asserts.assert_res_field_equal_value(studentphone_list,keyword_value)
pytest.assume(result)
@allure.step("学生费用预警查询-年份筛选")
@allure.story("学生费用预警查询-年份筛选")
@pytest.mark.parametrize("year",[select_year()])
@allure.step("学生费用预警查询-年份筛选")
def test_year_screen(self,year):
data = {
"pageNum": 1,
......@@ -68,10 +66,8 @@ class Test_select_student_expense:
result = public_asserts.assert_res_field_equal_value(years,year)
pytest.assume(result)
@allure.step('学生费用预警-期段筛选')
@allure.story('学生费用预警-期段筛选')
@pytest.mark.parametrize( "term",[select_term()])
@allure.step("学生费用预警查询-期段筛选")
def test_period_screen(self,term):
data = {
"pageNum": 1,
......@@ -87,10 +83,8 @@ class Test_select_student_expense:
result = public_asserts.assert_res_field_equal_value(terms,term)
pytest.assume(result)
@allure.step("学生费用预警-学生状态筛选")
@allure.story("学生费用预警-学生状态筛选")
@pytest.mark.parametrize("statuses",student_statuses)
@allure.step("学生费用预警查询-学生状态筛选")
def test_student_status(self,statuses):
status_value = statuses['status']
status_meaning = statuses['meaning']
......@@ -118,9 +112,8 @@ class Test_select_student_expense:
result = public_asserts.assert_res_field_in_list(student_status, status_value)
pytest.assume(result)
@allure.step('学生费用预警-年级筛选')
@allure.story('学生费用预警-年级筛选')
@pytest.mark.parametrize("grade",grades)
@allure.step("学生费用预警查询-年级筛选")
def test_select_grade(self,grade):
data = {
"pageNum": 1,
......@@ -146,9 +139,8 @@ class Test_select_student_expense:
result = public_asserts.assert_res_field_equal_value(grade_list,'4年级')
pytest.assume(result)
@allure.step('学生费用预警-学科筛选')
@allure.title('学生费用预警-学科筛选')
@pytest.mark.parametrize("subject", subjects)
@allure.step("学生费用预警查询-学科筛选")
def test_select_subject(self,subject):
data = {
"pageNum": 1,
......@@ -178,9 +170,8 @@ class Test_select_student_expense:
result = public_asserts.assert_res_field_equal_value(subject_list,subject)
pytest.assume(result)
@allure.step("学生费用预警-班型筛选")
@allure.story("学生费用预警-班型筛选")
@pytest.mark.parametrize("class_types",classTypes)
@allure.step("学生费用预警查询-班型筛选")
def test_select_classTypes(self,class_types):
class_types_value = class_types['classType']
classtype_name = class_types['classType_name']
......@@ -214,8 +205,7 @@ class Test_select_student_expense:
pytest.assume(result)
@allure.step("学生费用预警-组合筛选")
@allure.step("学生费用预警查询-组合筛选")
@allure.story("学生费用预警-组合筛选")
def test_select_all(self):
data = {
"pageSize": 10,
......@@ -230,37 +220,41 @@ class Test_select_student_expense:
"schoolAreaIds": school_areas
}
res = report_finance_student_expense_warning_post(header= jyy_header,body= data)
#校验名字
studentName_list = jsonpath.jsonpath(res,"$.data.list..studentName")
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])
pytest.assume(statue_res)
#校验年份
year_list = jsonpath.jsonpath(res,"$.data.list..year")
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, ['春'])
pytest.assume(term_res)
#校验学科
subjects_list = jsonpath.jsonpath(res, "$.data.list..subject")
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年级')
pytest.assume(grade_res)
# 校验班型
classType_list = jsonpath.jsonpath(res, "$.data.list..classType")
classType_res = public_asserts.assert_res_field_equal_value(classType_list, '极趣班')
pytest.assume(classType_res)
@allure.step("学生费用预警-列表数据汇总")
if res['data']['list'] == []:
assert res['msg'] == '成功'
assert res['code'] == 0
else:
#校验名字
studentName_list = jsonpath.jsonpath(res,"$.data.list..studentName")
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])
pytest.assume(statue_res)
#校验年份
year_list = jsonpath.jsonpath(res,"$.data.list..year")
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, ['春'])
pytest.assume(term_res)
#校验学科
subjects_list = jsonpath.jsonpath(res, "$.data.list..subject")
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年级')
pytest.assume(grade_res)
# 校验班型
classType_list = jsonpath.jsonpath(res, "$.data.list..classType")
classType_res = public_asserts.assert_res_field_equal_value(classType_list, '极趣班')
pytest.assume(classType_res)
@allure.story("学生费用预警-列表数据汇总")
def test_studentExtend_total(self):
data = {
......@@ -356,7 +350,7 @@ class Test_select_student_expense:
assert round(total_remainAmount[0], 2) == sum_remainAmount
@allure.step("学生费用预警-查看学生信息")
@allure.story("学生费用预警-查看学生信息")
def test_select_stuinfo(self):
data = {
"pageNum": 1,
......@@ -378,7 +372,7 @@ class Test_select_student_expense:
student_name = student_res['data']['studentName']
assert studentname_list[0] == student_name
@allure.step("学生费用预警-分页")
@allure.story("学生费用预警-分页判断")
def test_page(self):
data = {
"pageNum": 1,
......
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