diff --git a/0-Database.robot b/0-Database.robot deleted file mode 100644 index 0c611e3..0000000 --- a/0-Database.robot +++ /dev/null @@ -1,13 +0,0 @@ -*** Settings *** -Library DatabaseLibrary - -*** Test Cases *** -Connect to database - #连接数据库 - Connect To Database Using Custom Params pymysql host='8.135.8.221',user='root', password='password', \ port=3306,database='ztb_recycle' #连接数据库 - ${username} Query SELECT * FROM `ztb_recycle`.`qn_user` WHERE `real_name` LIKE '%赖勇兰%' #查找数据库ztb_recycle,表qn_user中real_name是赖勇兰的所有数据 - log many ${username} - #Execute Sql String DELETE FROM `ztb_recycle`.`qn_user` WHERE `real_name` LIKE '%赖勇兰%' AND `id` = 584452885719420928 #删除数据 - #Execute Sql String UPDATE `ztb_recycle`.`qn_user` SET `nick_name` = 'GGG' WHERE `id` = 597492076942331904 #修改数据 - #Query SELECT * FROM `ztb_recycle`.`qn_user` WHERE `real_name` LIKE '%赖勇兰%' into outfile 'C:/Users/qniao/Desktop/测试.xls' - Disconnect From Database #断开数据库的连接 diff --git a/3-pabotdemo/1-get_list.robot b/3-pabotdemo/1-get_list.robot deleted file mode 100644 index f49cf58..0000000 --- a/3-pabotdemo/1-get_list.robot +++ /dev/null @@ -1,45 +0,0 @@ -*** Settings *** -Library RequestsLibrary -Library Collections -Library DateTime -Library redis -Library urllib3 -Library pabot.pabotlib -Resource login.txt - -*** Variables *** - -*** Test Cases *** -a - userlogin {"accountType":2,"password":null,"account":"15014242835","captcha":"888888"} - userlogin {"accountType":2,"password":null,"account":"13333333333","captcha":"888888"} - login-token ${token} - -get-factorylist - #获取代卖列表 - ${header} Create Dictionary content-type=application/json X-APP-ID=470236309865238528 Authorization=${token} - Create Session factorylist http://api-client-ztb-test.qniao.cn ${header} - ${reps} Get On Session factorylist recycle-service/get/paper-mill-paper-category-price-list params=cityId=&enableSalesAgent=1&pageNum=1&pageSize=10&listType=0 - Should Be Equal As Strings ${reps.json()["message"]} successful - ${records} Get From Dictionary ${reps.json()["data"]} records #获取代卖纸厂列表 - FOR ${item} IN @{records} - ${name} Get From Dictionary ${item} name #获取纸厂name - ${paperCategoryList} Get From Dictionary ${item} paperCategoryList #获取纸厂品类列表 - ${cumulativeWeight} Get From Dictionary ${item} cumulativeWeight #累计已代卖吨数 - ${paperMillId} Get From Dictionary ${item} paperMillId #获取纸厂id - ${locProvinceName} Get From Dictionary ${item} locProvinceName #纸厂所在省 - ${locCityName} Get From Dictionary ${item} locCityName #纸厂所在市 - ${locDistrictName} Get From Dictionary ${item} locDistrictName #纸厂所在区 - Exit For Loop If '${name}'=='九一纸厂有限公司' - END - ${value} Evaluate random.choice(${paperCategoryList}) random - log to console \nvalue: ${value} - ${categoryid} Get From Dictionary ${value} categoryId #纸厂品类id - ${categoryName} Get From Dictionary ${value} categoryName #纸厂品类name - ${unitPrice} Get From Dictionary ${value} unitPrice #纸厂品类价格 - ${paperMillAddress} Catenate ${locProvinceName} ${locCityName} ${locDistrictName} - Set Global Variable ${categoryid} - Set Global Variable ${unitPrice} - Set Global Variable ${paperMillId} - Set Global Variable ${paperMillAddress} - Set Global Variable ${categoryName} diff --git a/3-pabotdemo/login.txt b/3-pabotdemo/login.txt deleted file mode 100644 index 72235c2..0000000 --- a/3-pabotdemo/login.txt +++ /dev/null @@ -1,36 +0,0 @@ -*** Settings *** -Library RequestsLibrary -Library Collections -Library urllib3 -Library DatabaseLibrary - -*** Variables *** -${url} http://api-client-ztb-test.qniao.cn - -*** Keywords *** -userlogin - [Arguments] ${data} - #验证码登录 - Disable Warnings - ${header} Create Dictionary content-type=application/json X-APP-ID=470236309865238528 - Create Session ZTBT https://api-client-uec-test.qniao.cn ${header} - ${data} Create Dictionary account=15014242835 captcha=888888 accountType=2 - #${data} Set Variable {"accountType":2,"password":null,"account":"15014242835","captcha":"${text_code}"} - ${respones} POST On Session ZTBT uec/authorize/by-captcha json=${data} - log ${respones.status_code} - log ${respones.json()} - ${token} Get From Dictionary ${respones.json()["data"]} token - Set Global Variable ${token} - [Teardown] - -login-token - [Arguments] ${token} - ${header} Create Dictionary content-type=application/json X-APP-ID=470236309865238528 - Create Session ZTBT ${url} ${header} - ${token1} Create Dictionary loginToken=${token} - ${reps} Post On Session ZTBT recycle-user-center/authorize/get/product-line-token/by/login-token json=${token1} - ${gettoken} Get From Dictionary ${reps.json()["data"]} token #获取token - ${userId} Get From Dictionary ${reps.json()["data"]} userId #获取用户id - log ${reps.json()["data"]["token"]} - Set Global Variable ${gettoken} - Set Global Variable ${userId} diff --git a/4-Data-comparison/1-Formula-calculation.robot b/4-Data-comparison/1-Formula-calculation.robot deleted file mode 100644 index f070f17..0000000 --- a/4-Data-comparison/1-Formula-calculation.robot +++ /dev/null @@ -1,12 +0,0 @@ -*** Settings *** -Library RequestsLibrary -Library Collections - -*** Test Cases *** -Formula_calculation - #公式计算 - ${结算单价}= Evaluate ${unitPrice}+${publicSubsidies} - ${扣点(%)}= Evaluate (${netWeight}-${settleWeight})/${netWeight} - ${代卖费(元)}= Set Variable If '${proxySellerSettleType}'=='1' ${unitSurcharge}*${netWeight} ${unitSurcharge}*${settleWeight} - ${第一笔应付金额(元)}= Set Variable If '${activitySettleType}'=='null' - '${activitySettleType}'=='2' diff --git a/DemoApp/APP_login.robot b/DemoApp/APP_login.robot deleted file mode 100644 index 2a52246..0000000 --- a/DemoApp/APP_login.robot +++ /dev/null @@ -1,12 +0,0 @@ -*** Settings *** -Suite Setup OpenApp -Library AppiumLibrary -Resource Keyword.txt -Library urllib3 - -*** Test Cases *** -login - Wait Until Element Is Visible com.qniao.cloudprint:id/tabs 10 #进入首页等待10S - Click Element name=我的 #点击-我的 - Click Element name=点击登录 #点击-点击登录 - Click Button //button[@class='wux-button wux-button--positive wux-button--default wux-button--block wux-button--bordered'] #点击-同意 diff --git a/DemoApp/Keyword.txt b/DemoApp/Keyword.txt deleted file mode 100644 index 6f69c05..0000000 --- a/DemoApp/Keyword.txt +++ /dev/null @@ -1,6 +0,0 @@ -*** Settings *** -Library AppiumLibrary - -*** Keywords *** -OpenApp - Open Application http://localhost:4723/wd/hub/session platformName=Android platformVersion=5.1.1 deviceName=127.0.0.1:5555 app=E:/lyl/Order/Order/DemoApp/app-release.apk appPackage=com.qniao.cloudprint appActivity=com.qniao.cloudprint.MainActivity unicodeKeyboard=True resetKeyboard=True diff --git a/DemoApp/__init__.robot b/DemoApp/__init__.robot deleted file mode 100644 index e69de29..0000000 diff --git a/DemoApp/app-release.apk b/DemoApp/app-release.apk deleted file mode 100644 index 459d3c8..0000000 Binary files a/DemoApp/app-release.apk and /dev/null differ diff --git a/Resource/__init__.robot b/Resource/__init__.robot deleted file mode 100644 index e69de29..0000000 diff --git a/Resource/关键字.txt b/Resource/关键字.txt deleted file mode 100644 index 8f605c8..0000000 --- a/Resource/关键字.txt +++ /dev/null @@ -1,35 +0,0 @@ -*** Settings *** -Library urllib3 -Library Collections -Library RequestsLibrary - -*** Variables *** -${header} {'content-type':'application/json','X-APP-ID':'470236309865238528'} -${url} http://api-client-ztb-test.qniao.cn - -*** Keywords *** -userlogin - #验证码登录 - Disable Warnings - Create Session ZTBT https://api-client-uec-test.qniao.cn ${header} - ${data} Create Dictionary account=15014242835 captcha=888888 accountType=2 - #${data} Set Variable {"accountType":2,"password":null,"account":"13168550964","captcha":"${text_code}"} - ${respones} POST On Session ZTBT uec/authorize/by-captcha json=${data} - log ${respones.status_code} - log ${respones.json()} - ${token} Get From Dictionary ${respones.json()["data"]} token - Set Global Variable ${token} - [Teardown] - [Return] ${token} - -login-token - #${header} Create Dictionary content-type=application/json X-APP-ID=470236309865238528 - Create Session ZTBT ${url} ${header} - ${token1} Create Dictionary loginToken=${token} - ${reps} Post On Session ZTBT recycle-user-center/authorize/get/product-line-token/by/login-token json=${token1} - ${gettoken} Get From Dictionary ${reps.json()["data"]} token #获取token - ${userId} Get From Dictionary ${reps.json()["data"]} userId #获取用户id - log ${reps.json()["data"]["token"]} - Set Global Variable ${gettoken} - Set Global Variable ${userId} - [Return] ${gettoken} diff --git a/Resource/关键字使用.robot b/Resource/关键字使用.robot deleted file mode 100644 index 14bd003..0000000 --- a/Resource/关键字使用.robot +++ /dev/null @@ -1,25 +0,0 @@ -*** Settings *** -Suite Setup Run Keywords userlogin -... AND 关键字.Login-token -Resource 关键字.txt -Library urllib3 -Library Collections -Library RequestsLibrary - -*** Variables *** -${url} https://api-client-ztb-test.qniao.cn - -*** Test Cases *** -get_paper-mill-city - #获取纸厂所在城市 - userlogin - ${header} Create Dictionary content-type=application/json X-APP-ID=470236309865238528 Authorization=QNT ${gettoken} - Create Session ZTBT ${url} ${header} - ${reps} Get On Session ZTBT recycle-service/get/paper-mill-city - ${data} Get From Dictionary ${reps.json()} data #城市列表 - FOR ${items} IN @{data} - ${cityName} Get From Dictionary ${items} cityName #城市name - ${cityId} Get From Dictionary ${items} cityId #城市id - Exit For Loop If '${cityName}'=='荆州市' - END - Set Global Variable ${cityId} diff --git a/pabot_results/0/output.xml b/pabot_results/0/output.xml deleted file mode 100644 index 4381051..0000000 --- a/pabot_results/0/output.xml +++ /dev/null @@ -1,657 +0,0 @@ - - - - - - -{"accountType":2,"password":null,"account":"15014242835","captcha":"888888"} - -Helper for quickly disabling all urllib3 warnings. - - - -${header} -content-type=application/json -X-APP-ID=470236309865238528 -Creates and returns a dictionary based on the given ``items``. -${header} = {'content-type': 'application/json', 'X-APP-ID': '470236309865238528'} - - - -ZTBT -https://api-client-uec-test.qniao.cn -${header} -Create Session: create a HTTP session to a server -Creating Session using : alias=ZTBT, url=https://api-client-uec-test.qniao.cn, headers={'content-type': 'application/json', 'X-APP-ID': '470236309865238528'}, cookies={}, auth=None, timeout=None, proxies=None, verify=False, debug=0 - - - -${data} -account=15014242835 -captcha=888888 -accountType=2 -Creates and returns a dictionary based on the given ``items``. -${data} = {'account': '15014242835', 'captcha': '888888', 'accountType': '2'} - - - -${respones} -ZTBT -uec/authorize/by-captcha -json=${data} -Sends a POST request on a previously created HTTP Session. -POST Request : url=https://api-client-uec-test.qniao.cn/uec/authorize/by-captcha - path_url=/uec/authorize/by-captcha - headers={'User-Agent': 'python-requests/2.24.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'content-type': 'application/json', 'X-APP-ID': '470236309865238528', 'Content-Length': '67'} - body=b'{"account": "15014242835", "captcha": "888888", "accountType": "2"}' - -POST Response : url=https://api-client-uec-test.qniao.cn/uec/authorize/by-captcha - status=200, reason= - headers={'Server': 'nginx/1.16.1', 'Date': 'Fri, 10 Sep 2021 08:55:51 GMT', 'Content-Type': 'application/json', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'Vary': 'Origin, Access-Control-Request-Method, Access-Control-Request-Headers'} - body={"code":0,"message":"successful","data":{"token":"d6SX3ESr8Jb2tYq/89Ft7HVC3UGImoJiXoPPa3TrtP0kQkPtfa2rGyLY0zHYqeeHdYeGUvl+ArHVatl0rAFUBQ==","userId":"630867430654218240"}} - -${respones} = <Response [200]> - - - -${respones.status_code} -Logs the given message with the given level. -200 - - - -${respones.json()} -Logs the given message with the given level. -{'code': 0, 'message': 'successful', 'data': {'token': 'd6SX3ESr8Jb2tYq/89Ft7HVC3UGImoJiXoPPa3TrtP0kQkPtfa2rGyLY0zHYqeeHdYeGUvl+ArHVatl0rAFUBQ==', 'userId': '630867430654218240'}} - - - -${token} -${respones.json()["data"]} -token -Returns a value from the given ``dictionary`` based on the given ``key``. -${token} = d6SX3ESr8Jb2tYq/89Ft7HVC3UGImoJiXoPPa3TrtP0kQkPtfa2rGyLY0zHYqeeHdYeGUvl+ArHVatl0rAFUBQ== - - - -${token} -Makes a variable available globally in all tests and suites. -${token} = d6SX3ESr8Jb2tYq/89Ft7HVC3UGImoJiXoPPa3TrtP0kQkPtfa2rGyLY0zHYqeeHdYeGUvl+ArHVatl0rAFUBQ== - - - - - -{"accountType":2,"password":null,"account":"13333333333","captcha":"888888"} - -Helper for quickly disabling all urllib3 warnings. - - - -${header} -content-type=application/json -X-APP-ID=470236309865238528 -Creates and returns a dictionary based on the given ``items``. -${header} = {'content-type': 'application/json', 'X-APP-ID': '470236309865238528'} - - - -ZTBT -https://api-client-uec-test.qniao.cn -${header} -Create Session: create a HTTP session to a server -Creating Session using : alias=ZTBT, url=https://api-client-uec-test.qniao.cn, headers={'content-type': 'application/json', 'X-APP-ID': '470236309865238528'}, cookies={}, auth=None, timeout=None, proxies=None, verify=False, debug=0 - - - -${data} -account=15014242835 -captcha=888888 -accountType=2 -Creates and returns a dictionary based on the given ``items``. -${data} = {'account': '15014242835', 'captcha': '888888', 'accountType': '2'} - - - -${respones} -ZTBT -uec/authorize/by-captcha -json=${data} -Sends a POST request on a previously created HTTP Session. -POST Request : url=https://api-client-uec-test.qniao.cn/uec/authorize/by-captcha - path_url=/uec/authorize/by-captcha - headers={'User-Agent': 'python-requests/2.24.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'content-type': 'application/json', 'X-APP-ID': '470236309865238528', 'Content-Length': '67'} - body=b'{"account": "15014242835", "captcha": "888888", "accountType": "2"}' - -POST Response : url=https://api-client-uec-test.qniao.cn/uec/authorize/by-captcha - status=200, reason= - headers={'Server': 'nginx/1.16.1', 'Date': 'Fri, 10 Sep 2021 08:55:51 GMT', 'Content-Type': 'application/json', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'Vary': 'Origin, Access-Control-Request-Method, Access-Control-Request-Headers'} - body={"code":0,"message":"successful","data":{"token":"d6SX3ESr8Jb2tYq/89Ft7HVC3UGImoJiXoPPa3TrtP0kQkPtfa2rGyLY0zHYqeeHdYeGUvl+ArHVatl0rAFUBQ==","userId":"630867430654218240"}} - -${respones} = <Response [200]> - - - -${respones.status_code} -Logs the given message with the given level. -200 - - - -${respones.json()} -Logs the given message with the given level. -{'code': 0, 'message': 'successful', 'data': {'token': 'd6SX3ESr8Jb2tYq/89Ft7HVC3UGImoJiXoPPa3TrtP0kQkPtfa2rGyLY0zHYqeeHdYeGUvl+ArHVatl0rAFUBQ==', 'userId': '630867430654218240'}} - - - -${token} -${respones.json()["data"]} -token -Returns a value from the given ``dictionary`` based on the given ``key``. -${token} = d6SX3ESr8Jb2tYq/89Ft7HVC3UGImoJiXoPPa3TrtP0kQkPtfa2rGyLY0zHYqeeHdYeGUvl+ArHVatl0rAFUBQ== - - - -${token} -Makes a variable available globally in all tests and suites. -${token} = d6SX3ESr8Jb2tYq/89Ft7HVC3UGImoJiXoPPa3TrtP0kQkPtfa2rGyLY0zHYqeeHdYeGUvl+ArHVatl0rAFUBQ== - - - - - -${token} - -${header} -content-type=application/json -X-APP-ID=470236309865238528 -Creates and returns a dictionary based on the given ``items``. -${header} = {'content-type': 'application/json', 'X-APP-ID': '470236309865238528'} - - - -ZTBT -${url} -${header} -Create Session: create a HTTP session to a server -Creating Session using : alias=ZTBT, url=http://api-client-ztb-test.qniao.cn, headers={'content-type': 'application/json', 'X-APP-ID': '470236309865238528'}, cookies={}, auth=None, timeout=None, proxies=None, verify=False, debug=0 - - - -${token1} -loginToken=${token} -Creates and returns a dictionary based on the given ``items``. -${token1} = {'loginToken': 'd6SX3ESr8Jb2tYq/89Ft7HVC3UGImoJiXoPPa3TrtP0kQkPtfa2rGyLY0zHYqeeHdYeGUvl+ArHVatl0rAFUBQ=='} - - - -${reps} -ZTBT -recycle-user-center/authorize/get/product-line-token/by/login-token -json=${token1} -Sends a POST request on a previously created HTTP Session. -POST Request : url=http://api-client-ztb-test.qniao.cn/recycle-user-center/authorize/get/product-line-token/by/login-token - path_url=/recycle-user-center/authorize/get/product-line-token/by/login-token - headers={'User-Agent': 'python-requests/2.24.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'content-type': 'application/json', 'X-APP-ID': '470236309865238528', 'Content-Length': '106'} - body=b'{"loginToken": "d6SX3ESr8Jb2tYq/89Ft7HVC3UGImoJiXoPPa3TrtP0kQkPtfa2rGyLY0zHYqeeHdYeGUvl+ArHVatl0rAFUBQ=="}' - -POST Response : url=http://api-client-ztb-test.qniao.cn/recycle-user-center/authorize/get/product-line-token/by/login-token - status=200, reason= - headers={'Server': 'nginx/1.16.1', 'Date': 'Fri, 10 Sep 2021 08:55:51 GMT', 'Content-Type': 'application/json;charset=UTF-8', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive'} - body={"code":0,"message":"successful","data":{"token":"d6SX3ESr8Jb2tYq/89Ft7HVC3UGImoJiXoPPa3TrtP0kQkPtfa2rGyLY0zHYqeeHdYeGUvl+ArHVatl0rAFUBQ==","userToken":null,"userId":"630867430654218240"}} - -${reps} = <Response [200]> - - - -${gettoken} -${reps.json()["data"]} -token -Returns a value from the given ``dictionary`` based on the given ``key``. -${gettoken} = d6SX3ESr8Jb2tYq/89Ft7HVC3UGImoJiXoPPa3TrtP0kQkPtfa2rGyLY0zHYqeeHdYeGUvl+ArHVatl0rAFUBQ== - - - -${userId} -${reps.json()["data"]} -userId -Returns a value from the given ``dictionary`` based on the given ``key``. -${userId} = 630867430654218240 - - - -${reps.json()["data"]["token"]} -Logs the given message with the given level. -d6SX3ESr8Jb2tYq/89Ft7HVC3UGImoJiXoPPa3TrtP0kQkPtfa2rGyLY0zHYqeeHdYeGUvl+ArHVatl0rAFUBQ== - - - -${gettoken} -Makes a variable available globally in all tests and suites. -${gettoken} = d6SX3ESr8Jb2tYq/89Ft7HVC3UGImoJiXoPPa3TrtP0kQkPtfa2rGyLY0zHYqeeHdYeGUvl+ArHVatl0rAFUBQ== - - - -${userId} -Makes a variable available globally in all tests and suites. -${userId} = 630867430654218240 - - - - - - - - -${header} -content-type=application/json -X-APP-ID=470236309865238528 -Authorization=${token} -Creates and returns a dictionary based on the given ``items``. -${header} = {'content-type': 'application/json', 'X-APP-ID': '470236309865238528', 'Authorization': 'd6SX3ESr8Jb2tYq/89Ft7HVC3UGImoJiXoPPa3TrtP0kQkPtfa2rGyLY0zHYqeeHdYeGUvl+ArHVatl0rAFUBQ=='} - - - -factorylist -http://api-client-ztb-test.qniao.cn -${header} -Create Session: create a HTTP session to a server -Creating Session using : alias=factorylist, url=http://api-client-ztb-test.qniao.cn, headers={'content-type': 'application/json', 'X-APP-ID': '470236309865238528', 'Authorization': 'd6SX3ESr8Jb2tYq/89Ft7HVC3UGImoJiXoPPa3TrtP0kQkPtfa2rGyLY0zHYqeeHdYeGUvl+ArHVatl0rAFUBQ=='}, cookies={}, auth=None, timeout=None, proxies=None, verify=False, debug=0 - - - -${reps} -factorylist -recycle-service/get/paper-mill-paper-category-price-list -params=cityId=&enableSalesAgent=1&pageNum=1&pageSize=10&listType=0 -Sends a GET request on a previously created HTTP Session. -GET Request : url=http://api-client-ztb-test.qniao.cn/recycle-service/get/paper-mill-paper-category-price-list?cityId=&enableSalesAgent=1&pageNum=1&pageSize=10&listType=0 - path_url=/recycle-service/get/paper-mill-paper-category-price-list?cityId=&enableSalesAgent=1&pageNum=1&pageSize=10&listType=0 - headers={'User-Agent': 'python-requests/2.24.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'content-type': 'application/json', 'X-APP-ID': '470236309865238528', 'Authorization': 'd6SX3ESr8Jb2tYq/89Ft7HVC3UGImoJiXoPPa3TrtP0kQkPtfa2rGyLY0zHYqeeHdYeGUvl+ArHVatl0rAFUBQ=='} - body=None - -GET Response : url=http://api-client-ztb-test.qniao.cn/recycle-service/get/paper-mill-paper-category-price-list?cityId=&enableSalesAgent=1&pageNum=1&pageSize=10&listType=0 - status=200, reason= - headers={'Server': 'nginx/1.16.1', 'Date': 'Fri, 10 Sep 2021 08:55:52 GMT', 'Content-Type': 'application/json;charset=UTF-8', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive'} - body={"code":0,"message":"successful","data":{"records":[{"paperMillId":"496657684465061888","name":"东莞市金田纸业有限公司","paperCategoryList":[{"categoryId":"496657684473450496","categoryName":"一级纸皮","yesterdayUnitPrice":null,"unitPrice":2.400,"floatingPrice":0.000,"publicSubsidies":0.002},{"categoryId":"496657684477644800","categoryName":"国产纸皮A类","yesterdayUnitPrice":null,"unitPrice":2.260,"floatingPrice":0.000,"publicSubsidies":0.004},{"categoryId":"496657684477644801","categoryName":"国产纸皮统货A级","yesterdayUnitPrice":null,"unitPrice":2.220,"floatingPrice":0.000,"publicSubsidies":0.005},{"categoryId":"496657684477644802","categoryName":"国产纸皮统货B级","yesterdayUnitPrice":null,"unitPrice":2.160,"floatingPrice":0.000,"publicSubsidies":0.003},{"categoryId":"496657684477644803","categoryName":"坑卡A级","yesterdayUnitPrice":null,"unitPrice":1.930,"floatingPrice":0.000,"publicSubsidies":null},{"categoryId":"496657684477644804","categoryName":"坑卡B级","yesterdayUnitPrice":null,"unitPrice":1.900,"floatingPrice":0.000,"publicSubsidies":null},{"categoryId":"496657684477644805","categoryName":"厂包纯坑卡","yesterdayUnitPrice":null,"unitPrice":2.020,"floatingPrice":0.000,"publicSubsidies":null},{"categoryId":"496657684481839104","categoryName":"薄灰","yesterdayUnitPrice":null,"unitPrice":2.020,"floatingPrice":0.000,"publicSubsidies":null},{"categoryId":"496657684481839105","categoryName":"大小花","yesterdayUnitPrice":null,"unitPrice":1.950,"floatingPrice":0.000,"publicSubsidies":null},{"categoryId":"496657684481839106","categoryName":"一级办公用纸","yesterdayUnitPrice":null,"unitPrice":2.250,"floatingPrice":0.000,"publicSubsidies":null},{"categoryId":"496657684481839107","categoryName":"报纸","yesterdayUnitPrice":null,"unitPrice":2.250,"floatingPrice":0.000,"publicSubsidies":null},{"categoryId":"496657684481839108","categoryName":"书本纸","yesterdayUnitPrice":null,"unitPrice":2.250,"floatingPrice":0.000,"publicSubsidies":null}],"locProvinceName":"广东省","locCityName":"东莞市","locDistrictName":"万江街道","logoImg":"http://medou.oss-cn-shenzhen.aliyuncs.com/bird_user/20092914192297702.jpg","priceDate":"2021-09-10 00:00:00","proxypaySurcharge":0.0100000,"foreignPaybackIntever":null,"foreignPaybackIntervalString":null,"cumulativeWeight":2476.69,"yesterdayTotalQuantity":80,"yesterdayRetainedQuantity":null,"hasFollowed":false,"isOperations":true,"manageNotifyMessage":"该纸厂已暂停接单,请联系相关负责人!","isPlaceAnOrder":true,"isRecentlySale":true},{"paperMillId":"612631294819569664","name":"山鹰华中纸业有限公司(国贸)","paperCategoryList":[{"categoryId":"612636090817449984","categoryName":"A级","yesterdayUnitPrice":null,"unitPrice":2.480,"floatingPrice":0.000,"publicSubsidies":null},{"categoryId":"612636090846810112","categoryName":"B级","yesterdayUnitPrice":null,"unitPrice":2.440,"floatingPrice":0.000,"publicSubsidies":null},{"categoryId":"612636090876170240","categoryName":"C级","yesterdayUnitPrice":null,"unitPrice":2.400,"floatingPrice":0.000,"publicSubsidies":null},{"categoryId":"612636090905530368","categoryName":"D级","yesterdayUnitPrice":null,"unitPrice":2.360,"floatingPrice":0.000,"publicSubsidies":null},{"categoryId":"612636090930696192","categoryName":"E级","yesterdayUnitPrice":null,"unitPrice":2.170,"floatingPrice":0.000,"publicSubsidies":null}],"locProvinceName":"湖北省","locCityName":"荆州市","locDistrictName":"公安县","logoImg":"https://qncloudprintfiletest.oss-cn-shenzhen.aliyuncs.com/cloudprint/1626229070940.png","priceDate":"2021-09-10 00:00:00","proxypaySurcharge":0.0150000,"foreignPaybackIntever":null,"foreignPaybackIntervalString":null,"cumulativeWeight":550.74,"yesterdayTotalQuantity":null,"yesterdayRetainedQuantity":null,"hasFollowed":false,"isOperations":true,"manageNotifyMessage":"该纸厂已暂停接单,请联系相关负责人!","isPlaceAnOrder":true,"isRecentlySale":true},{"paperMillId":"496656259144093696","name":"东莞金洲纸业有限公司","paperCategoryList":[{"categoryId":"496656259152482304","categoryName":"一级纸","yesterdayUnitPrice":null,"unitPrice":2.420,"floatingPrice":0.000,"publicSubsidies":null},{"categoryId":"496656259156676608","categoryName":"二级纸","yesterdayUnitPrice":null,"unitPrice":2.120,"floatingPrice":0.000,"publicSubsidies":0.005},{"categoryId":"496656259156676609","categoryName":"三级纸","yesterdayUnitPrice":null,"unitPrice":2.300,"floatingPrice":0.000,"publicSubsidies":0.005},{"categoryId":"574943578804064256","categoryName":"页子纸","yesterdayUnitPrice":null,"unitPrice":1.750,"floatingPrice":0.000,"publicSubsidies":0.008}],"locProvinceName":"广东省","locCityName":"东莞市","locDistrictName":"中堂镇","logoImg":"http://medou.oss-cn-shenzhen.aliyuncs.com/bird_user/20092915021066608.jpg","priceDate":"2021-09-10 00:00:00","proxypaySurcharge":0.0200000,"foreignPaybackIntever":null,"foreignPaybackIntervalString":null,"cumulativeWeight":14981.17,"yesterdayTotalQuantity":15,"yesterdayRetainedQuantity":1,"hasFollowed":false,"isOperations":true,"manageNotifyMessage":"测试修改停运提示语","isPlaceAnOrder":true,"isRecentlySale":true},{"paperMillId":"630378168733274112","name":"九一纸厂有限公司","paperCategoryList":[{"categoryId":"630378353450422272","categoryName":"白纸","yesterdayUnitPrice":null,"unitPrice":1.235,"floatingPrice":0.000,"publicSubsidies":0.005},{"categoryId":"630378353483976704","categoryName":"花纸","yesterdayUnitPrice":null,"unitPrice":1.355,"floatingPrice":0.000,"publicSubsidies":null},{"categoryId":"630378353517531136","categoryName":"黑卡","yesterdayUnitPrice":null,"unitPrice":1.230,"floatingPrice":0.010,"publicSubsidies":null}],"locProvinceName":"安徽省","locCityName":"安庆市","locDistrictName":"大观区","logoImg":"https://qncloudprintfiletest.oss-cn-shenzhen.aliyuncs.com/cloudprint/1630460295498.jpg","priceDate":"2021-09-10 00:00:00","proxypaySurcharge":0.0230000,"foreignPaybackIntever":null,"foreignPaybackIntervalString":null,"cumulativeWeight":761.71,"yesterdayTotalQuantity":15,"yesterdayRetainedQuantity":null,"hasFollowed":true,"isOperations":true,"manageNotifyMessage":"该纸厂已暂停接单,请联系相关负责人!","isPlaceAnOrder":true,"isRecentlySale":true},{"paperMillId":"496658246925422592","name":"广东理文造纸有限公司","paperCategoryList":[{"categoryId":"496658246933811204","categoryName":"页子纸B","yesterdayUnitPrice":null,"unitPrice":2.355,"floatingPrice":0.000,"publicSubsidies":null},{"categoryId":"518779191286697984","categoryName":"小花","yesterdayUnitPrice":null,"unitPrice":2.025,"floatingPrice":0.000,"publicSubsidies":0.002},{"categoryId":"570661783233236992","categoryName":"一级页子纸","yesterdayUnitPrice":null,"unitPrice":1.550,"floatingPrice":0.000,"publicSubsidies":0.000}],"locProvinceName":"广东省","locCityName":"东莞市","locDistrictName":"洪梅镇","logoImg":"http://medou.oss-cn-shenzhen.aliyuncs.com/bird_user/20092914310384806.jpg","priceDate":"2021-09-10 00:00:00","proxypaySurcharge":0.0050000,"foreignPaybackIntever":null,"foreignPaybackIntervalString":null,"cumulativeWeight":3281.16,"yesterdayTotalQuantity":null,"yesterdayRetainedQuantity":null,"hasFollowed":false,"isOperations":true,"manageNotifyMessage":"该纸厂已暂停接单,请联系相关负责人!","isPlaceAnOrder":false,"isRecentlySale":false},{"paperMillId":"496658726493753344","name":"东莞建晖纸业有限公司","paperCategoryList":[{"categoryId":"496658726502141952","categoryName":"A级","yesterdayUnitPrice":null,"unitPrice":2.240,"floatingPrice":0.000,"publicSubsidies":null},{"categoryId":"496658726506336256","categoryName":"B级","yesterdayUnitPrice":null,"unitPrice":1.520,"floatingPrice":0.000,"publicSubsidies":null},{"categoryId":"496658726506336257","categoryName":"C级","yesterdayUnitPrice":null,"unitPrice":2.235,"floatingPrice":0.000,"publicSubsidies":null},{"categoryId":"496658726506336258","categoryName":"统纸","yesterdayUnitPrice":null,"unitPrice":2.200,"floatingPrice":0.000,"publicSubsidies":null},{"categoryId":"496658726506336259","categoryName":"混合白纸","yesterdayUnitPrice":null,"unitPrice":2.250,"floatingPrice":0.000,"publicSubsidies":null},{"categoryId":"496658726510530560","categoryName":"一级办公纸","yesterdayUnitPrice":null,"unitPrice":2.390,"floatingPrice":0.000,"publicSubsidies":null},{"categoryId":"544862908161593344","categoryName":"国内六","yesterdayUnitPrice":null,"unitPrice":2.370,"floatingPrice":0.000,"publicSubsidies":null}],"locProvinceName":"广东省","locCityName":"东莞市","locDistrictName":"中堂镇","logoImg":"http://medou.oss-cn-shenzhen.aliyuncs.com/bird_user/20092915034414509.jpg","priceDate":"2021-09-10 00:00:00","proxypaySurcharge":0.0150000,"foreignPaybackIntever":null,"foreignPaybackIntervalString":null,"cumulativeWeight":2804.36,"yesterdayTotalQuantity":null,"yesterdayRetainedQuantity":null,"hasFollowed":false,"isOperations":false,"manageNotifyMessage":"该纸厂已暂停接单,请联系相关负责人!","isPlaceAnOrder":false,"isRecentlySale":false},{"paperMillId":"496666808611377152","name":"山鹰华中纸业有限公司","paperCategoryList":[{"categoryId":"496666808619765760","categoryName":"A级","yesterdayUnitPrice":null,"unitPrice":2.450,"floatingPrice":0.000,"publicSubsidies":0.006},{"categoryId":"496666808623960064","categoryName":"B级","yesterdayUnitPrice":null,"unitPrice":2.400,"floatingPrice":0.000,"publicSubsidies":0.002},{"categoryId":"496666808623960065","categoryName":"C级","yesterdayUnitPrice":null,"unitPrice":2.455,"floatingPrice":0.000,"publicSubsidies":0.008},{"categoryId":"496666808623960066","categoryName":"D级","yesterdayUnitPrice":null,"unitPrice":2.300,"floatingPrice":0.000,"publicSubsidies":null},{"categoryId":"496666808623960067","categoryName":"E级","yesterdayUnitPrice":null,"unitPrice":2.280,"floatingPrice":0.000,"publicSubsidies":null}],"locProvinceName":"湖北省","locCityName":"荆州市","locDistrictName":"公安县","logoImg":"http://medou.oss-cn-shenzhen.aliyuncs.com/bird_user/20082810161776895.jpg","priceDate":"2021-09-10 00:00:00","proxypaySurcharge":0.0150000,"foreignPaybackIntever":null,"foreignPaybackIntervalString":null,"cumulativeWeight":2124.26,"yesterdayTotalQuantity":null,"yesterdayRetainedQuantity":null,"hasFollowed":false,"isOperations":true,"manageNotifyMessage":"该纸厂已暂停接单,请联系相关负责人!","isPlaceAnOrder":false,"isRecentlySale":false},{"paperMillId":"496740585160445952","name":"江门星辉造纸有限公司","paperCategoryList":[{"categoryId":"496740585168834560","categoryName":"页子纸","yesterdayUnitPrice":null,"unit... (set the log level to DEBUG or TRACE to see the full content) - -${reps} = <Response [200]> - - - -${reps.json()["message"]} -successful -Fails if objects are unequal after converting them to strings. - - - -${records} -${reps.json()["data"]} -records -Returns a value from the given ``dictionary`` based on the given ``key``. -${records} = [{'paperMillId': '496657684465061888', 'name': '东莞市金田纸业有限公司', 'paperCategoryList': [{'categoryId': '496657684473450496', 'categoryName': '一级纸皮', 'yesterdayUnitPrice': None, 'unitPrice': 2.4, 'floating... - - - -${item} -@{records} - -{'paperMillId': '496657684465061888', 'name': '东莞市金田纸业有限公司', 'paperCategoryList': [{'categoryId': '496657684473450496', 'categoryName': '一级纸皮', 'yesterdayUnitPrice': None, 'unitPrice': 2.4, 'floatingP... - -${name} -${item} -name -Returns a value from the given ``dictionary`` based on the given ``key``. -${name} = 东莞市金田纸业有限公司 - - - -${paperCategoryList} -${item} -paperCategoryList -Returns a value from the given ``dictionary`` based on the given ``key``. -${paperCategoryList} = [{'categoryId': '496657684473450496', 'categoryName': '一级纸皮', 'yesterdayUnitPrice': None, 'unitPrice': 2.4, 'floatingPrice': 0.0, 'publicSubsidies': 0.002}, {'categoryId': '496657684477644800', 'categ... - - - -${cumulativeWeight} -${item} -cumulativeWeight -Returns a value from the given ``dictionary`` based on the given ``key``. -${cumulativeWeight} = 2476.69 - - - -${paperMillId} -${item} -paperMillId -Returns a value from the given ``dictionary`` based on the given ``key``. -${paperMillId} = 496657684465061888 - - - -${locProvinceName} -${item} -locProvinceName -Returns a value from the given ``dictionary`` based on the given ``key``. -${locProvinceName} = 广东省 - - - -${locCityName} -${item} -locCityName -Returns a value from the given ``dictionary`` based on the given ``key``. -${locCityName} = 东莞市 - - - -${locDistrictName} -${item} -locDistrictName -Returns a value from the given ``dictionary`` based on the given ``key``. -${locDistrictName} = 万江街道 - - - -'${name}'=='九一纸厂有限公司' -Stops executing the enclosing for loop if the ``condition`` is true. - - - - - -{'paperMillId': '612631294819569664', 'name': '山鹰华中纸业有限公司(国贸)', 'paperCategoryList': [{'categoryId': '612636090817449984', 'categoryName': 'A级', 'yesterdayUnitPrice': None, 'unitPrice': 2.48, 'floatin... - -${name} -${item} -name -Returns a value from the given ``dictionary`` based on the given ``key``. -${name} = 山鹰华中纸业有限公司(国贸) - - - -${paperCategoryList} -${item} -paperCategoryList -Returns a value from the given ``dictionary`` based on the given ``key``. -${paperCategoryList} = [{'categoryId': '612636090817449984', 'categoryName': 'A级', 'yesterdayUnitPrice': None, 'unitPrice': 2.48, 'floatingPrice': 0.0, 'publicSubsidies': None}, {'categoryId': '612636090846810112', 'categor... - - - -${cumulativeWeight} -${item} -cumulativeWeight -Returns a value from the given ``dictionary`` based on the given ``key``. -${cumulativeWeight} = 550.74 - - - -${paperMillId} -${item} -paperMillId -Returns a value from the given ``dictionary`` based on the given ``key``. -${paperMillId} = 612631294819569664 - - - -${locProvinceName} -${item} -locProvinceName -Returns a value from the given ``dictionary`` based on the given ``key``. -${locProvinceName} = 湖北省 - - - -${locCityName} -${item} -locCityName -Returns a value from the given ``dictionary`` based on the given ``key``. -${locCityName} = 荆州市 - - - -${locDistrictName} -${item} -locDistrictName -Returns a value from the given ``dictionary`` based on the given ``key``. -${locDistrictName} = 公安县 - - - -'${name}'=='九一纸厂有限公司' -Stops executing the enclosing for loop if the ``condition`` is true. - - - - - -{'paperMillId': '496656259144093696', 'name': '东莞金洲纸业有限公司', 'paperCategoryList': [{'categoryId': '496656259152482304', 'categoryName': '一级纸', 'yesterdayUnitPrice': None, 'unitPrice': 2.42, 'floatingPr... - -${name} -${item} -name -Returns a value from the given ``dictionary`` based on the given ``key``. -${name} = 东莞金洲纸业有限公司 - - - -${paperCategoryList} -${item} -paperCategoryList -Returns a value from the given ``dictionary`` based on the given ``key``. -${paperCategoryList} = [{'categoryId': '496656259152482304', 'categoryName': '一级纸', 'yesterdayUnitPrice': None, 'unitPrice': 2.42, 'floatingPrice': 0.0, 'publicSubsidies': None}, {'categoryId': '496656259156676608', 'catego... - - - -${cumulativeWeight} -${item} -cumulativeWeight -Returns a value from the given ``dictionary`` based on the given ``key``. -${cumulativeWeight} = 14981.17 - - - -${paperMillId} -${item} -paperMillId -Returns a value from the given ``dictionary`` based on the given ``key``. -${paperMillId} = 496656259144093696 - - - -${locProvinceName} -${item} -locProvinceName -Returns a value from the given ``dictionary`` based on the given ``key``. -${locProvinceName} = 广东省 - - - -${locCityName} -${item} -locCityName -Returns a value from the given ``dictionary`` based on the given ``key``. -${locCityName} = 东莞市 - - - -${locDistrictName} -${item} -locDistrictName -Returns a value from the given ``dictionary`` based on the given ``key``. -${locDistrictName} = 中堂镇 - - - -'${name}'=='九一纸厂有限公司' -Stops executing the enclosing for loop if the ``condition`` is true. - - - - - -{'paperMillId': '630378168733274112', 'name': '九一纸厂有限公司', 'paperCategoryList': [{'categoryId': '630378353450422272', 'categoryName': '白纸', 'yesterdayUnitPrice': None, 'unitPrice': 1.235, 'floatingPric... - -${name} -${item} -name -Returns a value from the given ``dictionary`` based on the given ``key``. -${name} = 九一纸厂有限公司 - - - -${paperCategoryList} -${item} -paperCategoryList -Returns a value from the given ``dictionary`` based on the given ``key``. -${paperCategoryList} = [{'categoryId': '630378353450422272', 'categoryName': '白纸', 'yesterdayUnitPrice': None, 'unitPrice': 1.235, 'floatingPrice': 0.0, 'publicSubsidies': 0.005}, {'categoryId': '630378353483976704', 'categ... - - - -${cumulativeWeight} -${item} -cumulativeWeight -Returns a value from the given ``dictionary`` based on the given ``key``. -${cumulativeWeight} = 761.71 - - - -${paperMillId} -${item} -paperMillId -Returns a value from the given ``dictionary`` based on the given ``key``. -${paperMillId} = 630378168733274112 - - - -${locProvinceName} -${item} -locProvinceName -Returns a value from the given ``dictionary`` based on the given ``key``. -${locProvinceName} = 安徽省 - - - -${locCityName} -${item} -locCityName -Returns a value from the given ``dictionary`` based on the given ``key``. -${locCityName} = 安庆市 - - - -${locDistrictName} -${item} -locDistrictName -Returns a value from the given ``dictionary`` based on the given ``key``. -${locDistrictName} = 大观区 - - - -'${name}'=='九一纸厂有限公司' -Stops executing the enclosing for loop if the ``condition`` is true. -Exiting for loop altogether. - - - - - - - -${value} -random.choice(${paperCategoryList}) -random -Evaluates the given expression in Python and returns the result. -${value} = {'categoryId': '630378353517531136', 'categoryName': '黑卡', 'yesterdayUnitPrice': None, 'unitPrice': 1.23, 'floatingPrice': 0.01, 'publicSubsidies': None} - - - -\nvalue: ${value} -Logs the given message to the console. - - - -${categoryid} -${value} -categoryId -Returns a value from the given ``dictionary`` based on the given ``key``. -${categoryid} = 630378353517531136 - - - -${categoryName} -${value} -categoryName -Returns a value from the given ``dictionary`` based on the given ``key``. -${categoryName} = 黑卡 - - - -${unitPrice} -${value} -unitPrice -Returns a value from the given ``dictionary`` based on the given ``key``. -${unitPrice} = 1.23 - - - -${paperMillAddress} -${locProvinceName} -${locCityName} -${locDistrictName} -Catenates the given items together and returns the resulted string. -${paperMillAddress} = 安徽省 安庆市 大观区 - - - -${categoryid} -Makes a variable available globally in all tests and suites. -${categoryid} = 630378353517531136 - - - -${unitPrice} -Makes a variable available globally in all tests and suites. -${unitPrice} = 1.23 - - - -${paperMillId} -Makes a variable available globally in all tests and suites. -${paperMillId} = 630378168733274112 - - - -${paperMillAddress} -Makes a variable available globally in all tests and suites. -${paperMillAddress} = 安徽省 安庆市 大观区 - - - -${categoryName} -Makes a variable available globally in all tests and suites. -${categoryName} = 黑卡 - - - - - - - - - - -All Tests - - - - -3-Pabotdemo -3-Pabotdemo.1-Get List - - - -RuntimeError catched in remotelib keyword execution. Maybe there is no connection - is pabot called with --pabotlib option? ErrorDetails: RuntimeError('Connection to remote server broken: [WinError 10061] 由于目标计算机积极拒绝,无法连接。',) - - diff --git a/pabot_results/0/robot_stderr.out b/pabot_results/0/robot_stderr.out deleted file mode 100644 index 2385724..0000000 --- a/pabot_results/0/robot_stderr.out +++ /dev/null @@ -1,2 +0,0 @@ -[ ERROR ] RuntimeError catched in remotelib keyword execution. Maybe there is no connection - is pabot called with --pabotlib option? ErrorDetails: RuntimeError('Connection to remote server broken: [WinError 10061] Ŀܾ޷ӡ',) -pabot.PabotLib#_close: threw an exception: is --pabotlib flag used? ErrorDetails: RuntimeError('Connection to remote server broken: [WinError 10061] Ŀܾ޷ӡ',) diff --git a/pabot_results/0/robot_stdout.out b/pabot_results/0/robot_stdout.out deleted file mode 100644 index 82d9778..0000000 --- a/pabot_results/0/robot_stdout.out +++ /dev/null @@ -1,18 +0,0 @@ -============================================================================== -3-Pabotdemo -============================================================================== -3-Pabotdemo.1-Get List -============================================================================== -a | PASS | ------------------------------------------------------------------------------- -get-factorylist -value: {'categoryId': '630378353517531136', 'categoryName': 'ڿ', 'yesterdayUnitPrice': None, 'unitPrice': 1.23, 'floatingPrice': 0.01, 'publicSubsidies': None} -| PASS | ------------------------------------------------------------------------------- -3-Pabotdemo.1-Get List | PASS | -2 tests, 2 passed, 0 failed -============================================================================== -3-Pabotdemo | PASS | -2 tests, 2 passed, 0 failed -============================================================================== -Output: E:\lyl\Order\Order\pabot_results\0\output.xml diff --git a/pabotdemo/添加银行卡.robot b/pabotdemo/添加银行卡.robot deleted file mode 100644 index 19770c0..0000000 --- a/pabotdemo/添加银行卡.robot +++ /dev/null @@ -1,52 +0,0 @@ -*** Settings *** -Documentation 添加银行卡 -Library RequestsLibrary -Library Collections -Resource 登录关键字.txt -Library pabot.pabotlib - -*** Variables *** - -*** Test Cases *** -a - userlogin {"accountType":2,"password":null,"account":"15014242835","captcha":"888888"} - login-token ${token} - getuserinfo - -getBankCardList - #获取银行卡列表 - ${headers} Create Dictionary content-type=application/json X-APP-ID=470236309865238528 Authorization=${token} - Create Session ZTBT http://api-client-psc-test.qniao.cn ${headers} - ${reps} Get On Session ZTBT payment-settlement-center/bankcard/getBankCardList - log ${reps.json()} - -bankcard_home - #获取银行卡信息 - ${headers} Create Dictionary content-type=application/json X-APP-ID=470236309865238528 Authorization=${token} - Create Session ZTBT http://api-client-psc-test.qniao.cn ${headers} - ${reps} Get On Session ZTBT payment-settlement-center/bankcard/bankcard/home/6212263602133910992 - log ${reps.json()} - ${cardNo} Get From Dictionary ${reps.json()["data"]} cardNo #获取银行卡号 - ${bankName} Get From Dictionary ${reps.json()["data"]} bankName #获取银行名称 - ${bank} Get From Dictionary ${reps.json()["data"]} bank #银行名称 - ${cardType} Get From Dictionary ${reps.json()["data"]} cardType #银行卡类型 - Set Global Variable ${cardNo} - Set Global Variable ${bankName} - Set Global Variable ${bank} - Set Global Variable ${cardType} - -bankverify - #添加银行卡 - ${headers} Create Dictionary content-type=application/json X-APP-ID=470236309865238528 Authorization=${token} - Create Session ZTBT http://api-client-psc-test.qniao.cn ${headers} - ${data} Set Variable {"phone":null,"cardName":null,"cardNo":"${cardNo}","openingBank":null,"cardType":null,"idno":null,"name":"${realName}","verificationCode":null,"isExist":0,"type":2} - ${repsponse} Post On Session ZTBT payment-settlement-center/bankcard/post/verify/bankverify ${data.encode('utf-8')} - log ${repsponse.json()} - -post_bankverify - #提交银行卡验证 - ${headers} Create Dictionary content-type=application/json X-APP-ID=470236309865238528 Authorization=${token} - Create Session ZTBT http://api-client-psc-test.qniao.cn ${headers} - ${data} Set Variable {"phone":"15014242835","cardName":"${bank}","cardNo":"${cardNo}","openingBank":null,"cardType":"${cardType}","idno":null,"name":"${realName}","verificationCode":"888888","isExist":0,"type":4} - ${reps} Post On Session ZTBT payment-settlement-center/bankcard/post/verify/bankverify ${data.encode('utf-8')} - log ${reps.json()} diff --git a/pabotdemo/登录关键字.txt b/pabotdemo/登录关键字.txt deleted file mode 100644 index 586962a..0000000 --- a/pabotdemo/登录关键字.txt +++ /dev/null @@ -1,46 +0,0 @@ -*** Settings *** -Library RequestsLibrary -Library Collections -Library urllib3 -Library DatabaseLibrary - -*** Variables *** -${url} http://api-client-ztb-test.qniao.cn - -*** Keywords *** -userlogin - [Arguments] ${data} - #验证码登录 - Disable Warnings - ${header} Create Dictionary content-type=application/json X-APP-ID=470236309865238528 - Create Session ZTBT https://api-client-uec-test.qniao.cn ${header} - ${data} Create Dictionary account=15014242835 captcha=888888 accountType=2 - #${data} Set Variable {"accountType":2,"password":null,"account":"15014242835","captcha":"${text_code}"} - ${respones} POST On Session ZTBT uec/authorize/by-captcha json=${data} - log ${respones.status_code} - log ${respones.json()} - ${token} Get From Dictionary ${respones.json()["data"]} token - Set Global Variable ${token} - [Teardown] - -login-token - [Arguments] ${token} - ${header} Create Dictionary content-type=application/json X-APP-ID=470236309865238528 - Create Session ZTBT ${url} ${header} - ${token1} Create Dictionary loginToken=${token} - ${reps} Post On Session ZTBT recycle-user-center/authorize/get/product-line-token/by/login-token json=${token1} - ${gettoken} Get From Dictionary ${reps.json()["data"]} token #获取token - ${userId} Get From Dictionary ${reps.json()["data"]} userId #获取用户id - log ${reps.json()["data"]["token"]} - Set Global Variable ${gettoken} - Set Global Variable ${userId} - -getuserinfo - #获取用户信息 - ${header} Create Dictionary content-type=application/json X-APP-ID=470236309865238528 Authorization=${gettoken} - Create Session baseinfo ${url} ${header} - ${reps} Get On Session baseinfo recycle-service/user/get/base-info - ${realName} Get From Dictionary ${reps.json()["data"]} realName #获取实名 - ${userId} Get From Dictionary ${reps.json()["data"]} userId #获取用户id - Set Global Variable ${realName} - Set Global Variable ${userId}