当前位置:网站首页>Allure use
Allure use
2022-07-28 08:24:00 【qq_ thirty-three million eight hundred and eight thousand four 】
One Configuration and use allure

Two Generate html The report
Report successfully generated to allure-report
(venv) D:\pyscript\tangseng\Interface_AutoTest\report>
3、 ... and Code
import requests
import yaml
import pytest
import allure
# @allure.step(" Class level test steps ")
@allure.feature(" I am a first-class demand ")
class Testclass():
@allure.story(" Secondary requirements 1")
@allure.severity(allure.severity_level.CRITICAL)
def test01(self):
allure.attach(" This is a plain text 1",name=" Text information 1",attachment_type=allure.attachment_type.TEXT)
print("in test01-1")
allure.attach(" This is a plain text 2", name=" Text information 2", attachment_type=allure.attachment_type.TEXT)
print("in test01-2")
assert 1
@allure.story(" Secondary requirements 2")
@allure.severity(allure.severity_level.CRITICAL)
def test02(self,f_module):
with allure.step(" First step "):
print("in test1")
allure.attach.file("./1.jpeg",name=" picture ",attachment_type=allure.attachment_type.JPG)
with allure.step(" The second step "):
print("in test2")
with allure.step(" The first 3 Step "):
print("in test3")
assert 1
@allure.story(" Secondary requirements 1")
@allure.issue('https://www.sohu.com','bug name ')
@allure.testcase('www.baidu.com',' Test case name ')
@allure.link("www.qq.com",name=" Tencent homepage ")
@allure.severity(allure.severity_level.CRITICAL)
@allure.title(' new title ')
@allure.description("<font color='red'> Describe the first line </font><Br/> Describe the second line <Br/> Describe the third line ")
def test03(self):
allure.attach("<body> This is a web page </body>", name="HTML Test module ", attachment_type=allure.attachment_type.HTML)
print("in test03")
assert 1
if __name__ == "__main__":
pytest.main()

边栏推荐
- win系统添加打印机
- Exception handling in SQL Server
- js卡片层叠样式的图片切换js特效
- Awk from introduction to earth (16) discussion on the types of awk variables -- about the two types of numbers and strings
- How to analyze the taxi business problem of didi SQL interview question
- SWM32系列教程5-ADC应用
- What if the computer desktop icon has a small yellow lock?
- @Documented 的作用
- Information system project manager must recite the core examination site (41) risk management plan
- Analysis of collector principle
猜你喜欢

Opencv's practical learning of credit card recognition (4)
![MySQL query error [err] 1046 - no database selected](/img/32/7d877571397c1e2024ec488b783e87.png)
MySQL query error [err] 1046 - no database selected

Use ffmpeg to generate single image + single audio streaming video in batches

CarSim simulation quick start (10) - Modeling of braking system

XSS知识点和20字符短域名绕过

EMC EMI磁珠的特性

EMC design strategy - clock

Information system project manager must recite the core examination site (41) risk management plan

@Documented 的作用
![Chapter 01 introduction of [notes of Huashu]](/img/11/cc405a730822305f02f05678f6a9d1.png)
Chapter 01 introduction of [notes of Huashu]
随机推荐
awk从入门到入土(16)awk变量类型探讨--关于数字和string两种类型
【青鸟学员故事】追风少年“李晓亮”
【300+精选大厂面试题持续分享】大数据运维尖刀面试题专栏(八)
DNA modified osmium OS nanoparticles osnps DNA modified iridium nanoparticles irnps DNA
Openstack dashboard configuring public network access
mysql,我们如何得到受查询影响的行数?
Mechanical revolution Jiaolong P wired network card driver can't play
PostgreSQL is the world's most advanced open source relational database
2022年湖南工学院ACM集训第五次周测AD题题解
解析树形结构 js
一键开关机电路
New generation cloud native message queue (II)
How to understand the adjective prefix of socket: "connection oriented" and "connectionless"
Redis of non relational database [detailed setup of redis cluster]
[book club issue 13] Chapter 2 notes on the packaging format and coding format of video files
Use ffmpeg to generate single image + single audio streaming video in batches
(Reprinted) plantuml Quick Guide
Opentsdb time series database
[book club issue 13] Chapter 1 multimedia processing tools ffmpeg tools
Spiral matrix