• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
没有阳光天空也是素颜
博客园 首页 新随笔 联系 订阅 订阅 管理

2019年3月14日

预期结果 参数化parametrize
摘要: 1、pytest.mark.parametrize装饰器可以实现测试用例参数化。 语法:1). @pytest.mark.parametrize("参数名",["01_值1","02_值2"])2). @pytest.mark.parametrize("参1,参2",[("01_参1的值","01_ 阅读全文
posted @ 2019-03-14 15:30 没有阳光天空也是素颜 阅读(213) 评论(0) 推荐(0)
 
用例失败重新运行
摘要: 1、失败重跑需要依赖pytest-rerunfailures插件,安装:pip install pytest-rerunfailures 2、命令行加个参数--reruns就行了,运行: py.test --reruns 1 --html=report.html --self-contained-h 阅读全文
posted @ 2019-03-14 11:41 没有阳光天空也是素颜 阅读(199) 评论(0) 推荐(0)
 
 

公告


博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3