1.命令提示框輸入:pip3 install requests
2.在工具中加入requests包,如 我使用的是Pycharm
一個簡單的額requests 示例:
被測代碼:
測試代碼:
excel文件:login.xlsx 使用openpyxl讀取excel文件,並且將讀到的數據保存在數組中,數據以字典的格式存儲: HttpRequests請求方法: 取路徑的方法: 單元測試類:使用unittest框架+ddt
高級用法:https://www.osgeo.cn/requests/user/advanced.html#prepared-requests 用法:https://www.cnblogs.com/lanyinhao/p/9634742.
目錄結構: excel文件:login.xlsx 使用openpyxl讀取excel文件,並且將讀到的數據保存在數組中,數據以字典的格式存儲: HttpRequests請求方法: 測試方法入口:1 測試方法入口:2 寫入結