Rah*_*loy 6 python selenium-webdriver python-unittest allure
我在 Pytest 中找到了魅力报告的解决方案。但我需要在 python-unittest 中生成诱惑报告。是否可以?
小智 -1
通过添加 allure 装饰器
例如
def test_nameOfTheTest(self):
with allure.step("Open browser"):
Run Code Online (Sandbox Code Playgroud)
或者您可以使用的定义
@allure.step("Open application")
def open_application(self):
Run Code Online (Sandbox Code Playgroud)
运行测试:
python -m pytest nameOftheFile.py(considering its in the root) --alluredir ./results
Run Code Online (Sandbox Code Playgroud)
得到结果:
allure serve ./results/
Run Code Online (Sandbox Code Playgroud)
希望这对您有帮助
归档时间: |
|
查看次数: |
2403 次 |
最近记录: |