*** Settings *** Documentation 分页查询病人列表 Suite Setup Test Setup get_login_token ${URL} mao Library Collections Library HttpLibrary.HTTP Library RequestsLibrary Library DateTime *** Variables *** ${uri} /IPatientService ${method} FindPatientsAsync *** Test Cases *** Class_001_分页查询病人列表 [Tags] inexecution [Template] findPatients_assertClass ${token} 1 10 *** Keywords *** findPatients_Post [Arguments] ${token} ${pageIndex} ${pageSize} ${param} Create Dictionary Set To Dictionary ${param} Token ${token} ${pageIndex1} Convert To Integer ${pageIndex} Set To Dictionary ${param} PageIndex ${pageIndex1} ${pageSize1} Convert To Integer ${pageSize} Set To Dictionary ${param} PageSize ${pageSize1} #Set To Dictionary ${param} Keyword ${keyword} #开始时间、结束时间 #Set To Dictionary ${param} IsValid ${isValid} ${data} body_data_list ${method} ${param} Log ${data} Log ---开始断言验证--- ${response} request_post ${URL} ${uri} ${data} #Log ${response} #log ${response.content} #${content} Set Variable ${response.content} #Log ---输出返回内容---: #Log Json ${content} INFO #Log ---开始断言验证--- #Should Be True ${response.status_code}==200 ${content} check_response ${response} Log ${content} [Return] ${content} findPatients_assertClass [Arguments] ${token} ${pageIndex} ${pageSize} ${content} findPatients_Post ${token} ${pageIndex} ${pageSize} ${result} get_content_result ${content} Log ${result} ${pageData} Get From Dictionary ${result} PageData Should Not Be Empty ${pageData} [Return] ${content} findPatients_assertException [Arguments] ${token} ${pageIndex} ${pageSize} ${keyword} ${startTime} ${endTime} ${isValid} ${error_code} ${error_msg} ${content} findPatients_Post ${token} ${pageIndex} ${pageSize} ${keyword} ${startTime} ${endTime} ${isValid} #${error} Get From Dictionary ${content.json()} error #${code} Get From Dictionary ${error} code #${message} Get From Dictionary ${error} message #Should Be Equal As Numbers ${code} ${error_code} #Should Be String ${message} ${error_msg} ${res} check_content_exception ${content} ${error_code} ${error_msg} [Return] ${content}