Pytest Testrail 模块 - 测试运行的后测试结果 [英] Pytest Testrail Module - Post Test Results for Test Runs

查看:79
本文介绍了Pytest Testrail 模块 - 测试运行的后测试结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 pytest testrail 模块并从这个演示脚本开始:

I am trying to use the pytest testrail module and started with this demo script:

import pytest
from pytest_testrail.plugin import testrail

@testrail('C165')
def test_run():
    print "T165:pass"

它确实会创建一个测试运行,但不会将任何结果发布到相应的测试用例中.

It does create a test run but does not post any results to the corresponding test cases.

推荐答案

尝试添加一个断言,因为这正是 pytest 钩子正在寻找的内容:

Try adding an assertion as that is what the pytest hook is looking for:

import pytest
from pytest_testrail.plugin import testrail

@testrail('C165')
def test_run():
    assert False

这篇关于Pytest Testrail 模块 - 测试运行的后测试结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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