我在Pytest中找到了针对魅力报告的解决方案。但是我需要在python-unittest中生成魅力报告。有可能吗?
通过添加诱人的装饰器
例如
def test_nameOfTheTest(self):
with allure.step("Open browser"):
或您可以使用的定义
@allure.step("Open application")
def open_application(self):
用于运行测试:
python -m pytest nameOftheFile.py(considering its in the root) --alluredir ./results
获得结果:
allure serve ./results/
希望这对您有帮助