In pytest print text to testrail comment

Deadly 提交于 2021-02-11 12:55:50

问题


I am using pytest-testrail plugin to upload test result to testrail. I'd like to post the output from my test program (usually using a print command) to testrail also. How can we do this? I tried something like pytest -rA or -s etc. without success.

for example, one of my test cases:

@pytestrail.case('C18346')
@pytest.mark.hw
@pytest.mark.debug
def test_cputemp():
    cmd = "cat /sys/class/hwmon/hwmon1/temp*_input"
    r = ssh_client.execute(cmd)
    print()
    print(r['out'])
    print("Please check the temperatures are normal")
    assert r['retval'] == 0

How to post printed content to testrail?

Thanks

来源:https://stackoverflow.com/questions/65111207/in-pytest-print-text-to-testrail-comment

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!