如果你还想从头学起Pytest,可以看看这个系列的文章哦! https://www.cnblogs.com/poloyy/category/1690628.html 前言 参数化 @pytest.mark.parametrize 的学习:https://www.cnblogs.com/poloyy/p/12675457.html 默认 allure 报告上的测试用例标题不设置默认就是用例名称,这样可读性不高 当结合 @pytest.mark.parametrize 参数化完成数据驱动时,如果标题…
如果你还想从头学起Pytest,可以看看这个系列的文章哦! https://www.cnblogs.com/poloyy/category/1690628.html 前言 @allure.title 和 @allure.description 都是装饰器,给测试用例提供标题和描述 其实 allure 还提供了在测试用例执行过程中动态指定标题和描述等标签的方法 如: allure.dynamic.description  allure.dynamic.title allure.dynamic 的源…
如果你还想从头学起Pytest,可以看看这个系列的文章哦! https://www.cnblogs.com/poloyy/category/1690628.html 前言 前面介绍了两种allure的特性 @allure.step() 装饰器:可以设置测试步骤,让测试用例的执行过程更加详细 allure.attach() 函数:可以设置需要显示在allure报告的附件,包含了多种类型,可以通过allure.attachment_type查看支持的类型 这一篇幅,我们主要来讲解另外两个特性,可以增…
如果你还想从头学起Pytest,可以看看这个系列的文章哦! https://www.cnblogs.com/poloyy/category/1690628.html 前言 allure除了支持pytest自带的特性之外(fixture.parametrize.xfail.skip),自己本身也有强大的特性可以在pytest中使用 @allure.step allure报告最重要的一点是,它允许对每个测试用例进行非常详细的步骤说明 通过 @allure.step() 装饰器,可以让测试用例在all…
如果你还想从头学起Pytest,可以看看这个系列的文章哦! https://www.cnblogs.com/poloyy/category/1690628.html 前言 上一篇文章介绍了两种allure的特性 @allure.description() :添加测试用例描述,一共三种方式哦! @allure.title():指定测试用例标题,默认是函数名哦! 这一篇幅,我们主要来讲解最后三个常见特性,主要是为了将allure报告和测试管理系统集成,可以更快速的跳转到公司内部地址 @allure.…
如果你还想从头学起Pytest,可以看看这个系列的文章哦! https://www.cnblogs.com/poloyy/category/1690628.html 前言 前面几篇文章主要介绍了allure的特性,这篇文章我们就来讲下allure的标记用法 有时候我们写pytest的时候,会用到 @pytest.mark 但并不会显示在allure报告上 而allure也提供了三种类型的标记装饰器,它们是可以显示在allure报告上的 allure的标记装饰器 BDD样式的标记装饰器 优先级(严…
如果你还想从头学起Pytest,可以看看这个系列的文章哦! https://www.cnblogs.com/poloyy/category/1690628.html 先看看 allure 命令的帮助文档 cmd 敲 allure -h allure 命令的语法格式 allure [options] [command] [command options] options 列表 Options: --help 命令行帮助文档 -q, --quiet 切换至安静模式 Default: false -v…
如果你还想从头学起Pytest,可以看看这个系列的文章哦! https://www.cnblogs.com/poloyy/category/1690628.html allure 和 pytest 相关环境安装 # allure pip3 install allure-pytest -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com #pytest pip3 install pytest -i http://pypi.…
参数化parametrize 先看一个简单的pytest参数化案例演示test_a.py # test_a.py import pytest import allure def login(username, password): '''登录''' print("输入账号:%s" % username) print("输入密码:%s" % password) # 返回 return {"code": 0, "msg": &qu…
Html生成模块:WriteHtml.cs using System.Collections.Generic; using System.IO; using System.Text; namespace System { /// <summary> /// Html /// </summary> public class Html { /// <summary> /// 生成Html /// </summary> /// <param name=&qu…