环境准备

⼀、配置python环境
2、cmd中执行以下命令 #提供读写Excel的能力
pip install xlrd
pip install xlwt
pip install pandas # 报错的话,输入pip --default-time=100 install pandas 就会成功安装panda
3、pytest +allure环境安装
pip install pytest #PyTest是基于python的开源测试框架,自动检测测试用例,支持参数化,跳过特定用例,失败重试等功能
pytest --version #查看版本
4、pytest规则
● 测试文件名要以 test_ 开头或以 test 结尾
● 测试类要以 Test 开头并且不能有 init 方法
● 测试函数要以 test
开头,测试函数不必须在测试类当中

下载 allure,windows 和 mac 一样

  1. allure包下载:https://github.com/allureframework/allure2/releases
  2. 下载最新版 zip 压缩包,解压缩到某个目录,如 allure-commandline
  3. 把 bin 目录加⼊环境变量
    Windows 添加环境变https://www.icode9.com/content-3-740792.html
    然后执 pip install allure-pytest 安装 python 库

-----post 和 get 请求的区别
get 请求默认会被浏览器缓存,但是post请求不会
get 请求只能进行url编码,post请求支持多种编码方式
get请求会被浏览器历史记录缓存,而post不会
get请求的参数直接暴露在url,post请求的参数在 body当中

你可能感兴趣的:(环境准备)