我找不到将字符串添加到代表我的测试步骤的 HTML 报告的方法。
我在https://pypi.org/project/pytest-html/中看到 我应该尝试使用:
extra.text('Add some simple Text')
但似乎它不起作用。
from pytest_html import extras
class FirstFeatureTests:
def setup_class(self):
print("\n------------ in setup_class ------------")
def teardown_class(self):
print("------------ in teardown_class ------------")
@mark.example
def test_1_first_feature(self):
print("starting test !!!!!")
extras.text("step 1: ")
extras.text('step 2: ')
assert True
我希望每个测试都包含测试步骤,这些测试步骤表示为带有信息性描述的字符串。
有什么办法吗?