擅长:python、mysql、java
<p>我也遇到了类似的问题,只是我收到了不同的詹金斯信息,无法判断哪个测试被跳过了。在</p>
<p>结果表明,如果模块中唯一的测试是跳过的测试,那么jenkins将不会在测试结果列表中显示该测试(使用decorator或jrbe的soloution)。您可以看到在总结果中有一个被跳过的测试,但无法判断被跳过的测试在哪个测试或哪个模块中。在</p>
<p>为了解决这个问题(好的hack solve),我回到在测试中使用decorator并添加了一个虚拟测试(因此有1个测试运行,1个测试被跳过):</p>
<pre><code>@pytest.skip('SONIC-3218')
def test_segments_create_delete(self, api):
logging.info('TestCreateDeleteSegments.test_segments_create_delete')
def test_dummy(self, api):
'''
Dummy test to see if suite will display in jenkins if one
test is run and 1 is skipped (instead of having only skipped tests)
'''
logging.info('TestCreateDeleteSegments.test_dummy')
</code></pre>
<p>对我来说,这是因为我宁愿有一个额外的虚拟测试,并能够找到我跳过的测试。在</p>