Pytest/魅力-如何生成测试用例描述? [英] Pytest/Allure - How to generate testcase description?

查看:585
本文介绍了Pytest/魅力-如何生成测试用例描述?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对Allure还是很陌生,我正在尝试在报告中生成测试描述.查看其他SO问题和pytest-allure-adaptor文档,似乎没有选择的办法.

I'm still fairly new to Allure, and I'm trying to generate a test description in my reports. Looking at other SO questions and pytest-allure-adaptor documentation, there doesn't seem to be an option to do this.

我最接近的是这样写的:

The closest I've gotten was writing this:

def test_one():
   """
   This is the test description.
   """
   assert pass

这是非常有限的,因为它会自动将其折叠.在魅力"示例报告中,您可以看到它们可以使用标题,也可以使用某种降​​价标签.我该如何使用pytest-allure-adaptor?

And that's very limited, since it automatically collapses it. In the Allure example report, you can see that they can use headers and probably markdown of some sort. How do I do that with pytest-allure-adaptor?

推荐答案

当前,您无法在PyTest Adaptor中更改描述类型.请参阅问题 https://github.com/allure-framework/allure-python/Issues/93

Currently you can't change the type of description in PyTest Adaptor. See the issue https://github.com/allure-framework/allure-python/issues/93

这篇关于Pytest/魅力-如何生成测试用例描述?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆