当前位置: 首页 > news >正文

做设计 素材网站有哪展览公司

做设计 素材网站有哪,展览公司,北京 网站建设 知乎,网站发布流程目录 1. 搭建allure环境 2. 生成报告 3. logo定制 4. 企业级报告内容或层级定制 5. allure局域网查看 1. 搭建allure环境 1.1 JDK#xff0c;使用PyCharm 找到pycharm安装目录找到java.exe记下jbr目录的完整路径#xff0c;eg: C:\Program Files\JetBrains\PyCharm Com…目录 1. 搭建allure环境 2. 生成报告 3. logo定制 4. 企业级报告内容或层级定制 5. allure局域网查看 1. 搭建allure环境 1.1 JDK使用PyCharm 找到pycharm安装目录找到java.exe记下jbr目录的完整路径eg: C:\Program Files\JetBrains\PyCharm Community Edition 2022.3\jbr\bin将地址添加进入环境变量重启 1.2 allure程序 下载地址https://github.com/allure-framework/allure2/releases解压到指定路径。eg: D:\study\allure-2.25.0\allure-2.25.0\bin执行allurePath 追加allure安装路径验证是否安装成功在dos窗口和Pycharm需要重启加载环境变量中都需要验证allure --version 2. 生成报告 2.1 生成临时的json格式的报告 addopts -vs --alluredir./temps --clean-alluredir ; --clean-alluredir生成临时报告并清除 2.2 生成HTML的allure报告 if __name__ __main__:pytest.main([./test_study/test_fixture.py])os.system(allure generate ./temps -o ./reports --clean) # -o 指定输出测试报告路径# --clean 清空历史数据# ./temps 表示用来生成html的JSON临时文件目录# ./reports 表示html文件生成目录 3. logo定制 3.1 在D:\study\allure-2.25.0\allure-2.25.0\config目录下的allure.yml中配置自定义的logo插件【- custom-logo-plugin】 3.2 重新运行并生成allue报告 3.3 增加一个自己的logo文件并修改D:\study\allure-2.25.0\allure-2.25.0\plugins\custom-logo-plugin\static路径下的styles.css文件里面的样式最好将需要修改的logo也放在custom-logo-plugin目录下 .side-nav__brand {background: url(1.png) no-repeat left center !important; //将你需要的logo图片地址放在这里margin-left: 22px; //调整方位height: 90px; //调整大小background-size: contain !important; } //去掉图片后边 allure 文本 .side-nav__brand-text{display: none; } //配置logo 后面的字体样式与字体大小 .side-nav__brand:after {content: 测试测试;margin-left: 18px;height: 20px;font-family: Arial;font-size: 13px; } 注logo图片和文字可以同时存在也可以只要一个 4. 企业级报告内容或层级定制 左边 1. 项目名称史诗allure.epic(测试报告) 2. 模块名称特性allure.feature(测试模块) 3. 接口名称分组allure.story(测试接口) allure.epic(测试报告) allure.feature(测试模块) class TestA:allure.story(测试1)def test_1(self):print(11111)allure.story(测试2)def test_2(slef):print(22222) 将多个用例写到一个组 allure.story(测试1) allure.title(用例1) def test_1(self):print(11111)allure.story(测试1) def test_2(slef):allure.dynamic.title(用例2)print(22222) 4. 用例标题allure.title(用例1) or allure.dynamic.title(用例2) 两种方法都可以实现 allure.title(用例1) //方法1 def test_1(self):print(11111)allure.story(测试2) def test_2(slef):allure.dynamic.title(用例2) //方法2print(22222) 右边 1. 测试用例严重级别allure.severity(allure.severity_level.BLOCKER) //BLOCKER(致命)CRITICAL严重,NORMAL(一般)MINOR提示TRIVIAL轻微一般默认为NORMAL allure.severity(allure.severity_level.TRIVIAL) allure.story(测试3) def test_3(slef):print(33333) 2. 测试用例的描述allure.description(测试用例的描述) allure.description(测试用例的描述方法1) allure.title(测试4) def test_4(slef):print(44444)allure.title(测试5) def test_5(slef):allure.dynamic.description(测试用例的描述方法2)print(55555) 3. 接口访问链接allure.link(接口链接) 4. BUG链接allure.issue(bug链接) 5. 测试用例链接allure.testcase(用例链接) allure.story(测试6) allure.link(https://www.baidu.com/0,name接口链接) allure.issue(https://www.baidu.com/,namebug链接) allure.testcase(https://www.baidu.com/,name用例链接) def test_6(slef):print(66666) 6. 测试用例的操作步骤allure.step(第str(i)步): allure.story(测试1) def test_7(self):for i in range(0,10):with allure.step(第str(i)步):pass 7. 测试附件allure.attach(bodycontent,name错误截图,attachment_typeallure.attachment_type.PNG) //一般用于错误截图常用于web自动化测试 allure.story(测试1) def test_8(self):# 附件上传需要使用二进制可以是图片可以是文本可以是其它文件with open(rD:\study\allure-2.25.0\allure-2.25.0\plugins\custom-logo-plugin\static\1.png,moderb) as f:content f.read()allure.attach(bodycontent,name错误截图,attachment_typeallure.attachment_type.PNG) 8. 文本内容的定制一般应用于接口自动化 allure.story(测试1) def test_9(self):# 请求allure.attach(https://www.baidu.com/0,name接口地址,attachment_typeallure.attachment_type.TEXT)allure.attach(接口参数一般从yaml中获取,name接口参数,attachment_typeallure.attachment_type.TEXT)allure.attach(请求方式get/post,name请求方式,attachment_typeallure.attachment_type.TEXT)allure.attach(请求头一般从yaml中获取,name请求头,attachment_typeallure.attachment_type.TEXT)# 响应allure.attach(响应文本一般从yaml中获取, name响应文本, attachment_typeallure.attachment_type.TEXT)allure.attach(执行结果成功/失败, name执行结果, attachment_typeallure.attachment_type.TEXT) 9. 数据驱动 allure.story(测试1) pytest.mark.parametrize(x, [这是第1个测试值, 这是第2个测试值]) def test_a(self,x):print(ftest_a中的X值为{x}) 由于使用数据驱动用例标题会展示参数数据化驱动中的所有参数若不想要显示则需要修改allure配置 # 修改前 test_result.parameters.extend([Parameter(namename, valuerepresent(value)) for name, value in params.items()if name not in current_param_names])# 修改后 将列表内容去除即可 test_result.parameters.extend([]) 5. allure局域网查看 局域网内网allure open ./reports if __name__ __main__:pytest.main([./test_study/test_allure.py])os.system(allure generate ./temps -o ./reports --clean)os.system(allure open ./reports)
http://www.zqtcl.cn/news/656890/

相关文章:

  • 什么是静态页面网站甜品网站建设方案
  • 做一个网站大概多少钱养生网站源码
  • 淘宝客网站建设分类校园网站开发设计报告
  • 个人网站模板 免费儿童编程培训机构
  • 运动健身型网站开发免费ddns域名注册
  • 专业pc网站建设wordpress 支持php7.1
  • 廊坊网站制作系统虚拟服务器搭建
  • 做网站的优势wordpress百度索引链接
  • 网站哪些功能是PHP做的wordpress 正文宽度
  • wordpress考试主题株洲优化公司
  • 怎么做企业网站建设方案怎样查网站有没有备案
  • 浙江短视频seo优化网站专做童装的网站
  • 印刷包装公司网站模板陕西住房和城乡建设厅网站
  • 成都响应式网站建设公司网站 建设的必要性
  • 江苏省建设局官方网站查询wordpress收到登录错误
  • 个人与企业签订网站开发合同北京个人网站建设
  • 阀门网站设计dede静态网站
  • 做暧暧视频网站在线网站建设项目推文
  • 岳池发展建设集团有限公司门户网站毕设做网站工作量够吗
  • 手机网站客户端设计与实现手机网站 焦点图
  • 网站建设常用的开发语言介绍设计公司官网首页
  • 做网站能拿多少钱视频策划方案怎么写
  • 权威的顺德网站建设dw不会写代码能建立网站吗
  • 做网站美工的前途怎么样企业通讯软件下载
  • 客户说做网站价格高成都住建局官网住建智慧建管
  • 股票分析网站可以做推广吗网站开发 简历项目经历
  • 军人可以做网站吗学生信息管理系统网页设计教程
  • 使用循环视频做背景的网站青岛网站推广的价格
  • 邯山区建设局网站上海公司招聘
  • 做网站沈阳本地网站忧化 优帮云