06 2020 档案
摘要:1.@pytest.mark.parametrize()装饰范围 装饰类,则类中所有的测试用例都是用这组参数 装饰测试函数,只有被装饰的函数使用这组参数 2.@pytest.mark.parametrize() 装饰的三种方式 import pytest test_datas = [ (11, 22
阅读全文
摘要:前言: 在使用多个断言时,第一个断言失败,程序会终止,不会执行后面的断言 思路一(正确):pytest-assume 1.pytest-assume pip install pytest-assume 实例 import pytest @pytest.mark.parametrize(('x', '
阅读全文
摘要:1.selenium 截图的四种方式 1. save_sreenshoot # 一般不用 坑多 2. get_sreenshoot_as_file # 保存网页截图 3. get_sreenshoot_as_png #获取二进制数据流 4.get_sreenshoot_as_base64 # bas
阅读全文
摘要:1.清空历史数据 --clean-alluredir pytest.main(['-s','-q','--alluredir','./report/allure_raw','--clean-alluredir']) #第一种方式 直接启动服务打开 os.popen('allure serve rep
阅读全文
摘要:第一种方式:ids 1.参数化(pytest.mark.parametrize) # test_a.py import pytest import allure def login(username, password): '''登录''' print("输入账号:%s" % username) p
阅读全文
摘要:1.方式一: 测试用例中with allure.step(): # common_fucntion.py import allure import pytest ''' 流程性的用例,添加测试步骤,让用例更清晰 用例步骤:1.登陆, 2.浏览商品 3.添加购物车 4.生成订单 5.支付成功 '''
阅读全文
摘要:1.allure用例描述 包含:epic,feature, story, title, testcase, issue, description, step, serverity, link, attachment 2.实例应用 import pytest import allure @pytest
阅读全文
摘要:jenkins下载安装 1.官网下载msi文件,双击安装 会生成一个jenkins服务 直接访问 http://localhost:8080/ 即可访问jenkins 2.jenkins 插件下载缓慢, 换源 文件1:Jenkins/updates/default.json 替换 updates.j
阅读全文
摘要:1.常用命令 git init # 初始化本地仓库 git add 文件/. # 工作区提交文件到暂存区 . 提交所有文件git reset HEAD 文件/. # 从暂存区回滚到工作区git config --global user.name '用户名'git config --global us
阅读全文
摘要:1.docker安装 # centos7 安装docker 1 安装依赖 sudo yum install -y yum-utils device-mapper-persistent-data lvm2 2 设置docker yum源为阿里云 sudo yum-config-manager --ad
阅读全文

浙公网安备 33010602011771号