allure测试报告中为每条测试用动态添加属性
allure.dynamic.feature()
allure.dynamic.link()
allure.dynamic.issue()
allure.dynamic.testcase()
allure.dynamic.story()
allure.dynamic.title()
allure.dynamic.description()
举例:
import allure
@allure.title("装饰器标题")
def test_1():
print(123)
allure.dynamic.title("动态标题")
def test_1():
"""
动态设置描述
"""
print(123)
allure.dynamic.description("动态描述")
allure.dynamic.title("动态标题")
网友评论