*** Settings *** Test Teardown Library RequestsLibrary Library Collections Library urllib3 *** Variables *** &{cloudfactory_supplierfocus_header} Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847956666 Authorization=${getlogintoken_supplier_focus} ${yytclient} https://api-client-yyt-test.qniao.cn *** Test Cases *** supplierfocus_save_paper_manufacturer Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header} ${paper_manufacturer_name} Set Variable autotest_paper_manufacturer_name ${paper_manufacturer_shortName} Set Variable apmn ${paper_manufacturer_description} Set Variable This autotest_paper_manufacturer ${paper_manufacturer_logoImg} Set Variable https://qncloudprintfiletest.oss-cn-shenzhen.aliyuncs.com/cloudprint/1632378545847.jpg ${body} Set Variable {"name":"${paper_manufacturer_name}","shortName":"${paper_manufacturer_shortName}","description":"${paper_manufacturer_description}","logoImg":"${paper_manufacturer_logoImg}"} Set Global Variable ${paper_manufacturer_name} Set Global Variable ${paper_manufacturer_shortName} Set Suite Variable ${paper_manufacturer_description} Set Suite Variable ${paper_manufacturer_logoImg} ${response} POST On Session yytclient /trading-center/save/paper-manufacturer ${body.encode("utf8")} Log ${response.status_code} log ${response.json()} Should Be Equal As Numbers 200 ${response.status_code} Should Be Equal As Strings successful ${response.json()["message"]} sleep 2 supplierfocus_get_paper_manufacturer_list Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header} ${response} Get On Session yytclient /trading-center/get/paper-manufacturer/list Log ${response.status_code} log ${response.json()} Should Be Equal As Numbers 200 ${response.status_code} Should Be Equal As Strings successful ${response.json()["message"]} Should Be Equal As Strings ${paper_manufacturer_name} ${response.json()["data"]["records"][0]["name"]} ${paper_manufacturer_id} Get From Dictionary ${response.json()["data"]["records"][0]} id Set Global Variable ${paper_manufacturer_id} supplierfocus_search_paper_manufacturer Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header} ${param} Set Variable searchValue=${paper_manufacturer_name} ${response} Get On Session yytclient /trading-center/get/paper-manufacturer/list params=${param} Log ${response.status_code} log ${response.json()} Should Be Equal As Numbers 200 ${response.status_code} Should Be Equal As Strings successful ${response.json()["message"]} Should Be Equal As Strings ${paper_manufacturer_name} ${response.json()["data"]["records"][0]["name"]} Should Be Equal As Strings ${paper_manufacturer_id} ${response.json()["data"]["records"][0]["id"]} supplierfocus_edit_paper_manufacturer Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header} ${body} Set Variable {"id":"${paper_manufacturer_id}","name":"${paper_manufacturer_name}","shortName":"${paper_manufacturer_shortName}","description":"${paper_manufacturer_description}","logoImg":"${paper_manufacturer_logoImg}"} ${response} POST On Session yytclient /trading-center/save/paper-manufacturer ${body.encode("utf8")} Log ${response.status_code} log ${response.json()} Should Be Equal As Numbers 200 ${response.status_code} Should Be Equal As Strings successful ${response.json()["message"]}