我正在尝试使用python中的robot api从output.xml获取失败的测试用例名称,我能够使用下面的代码获取失败/通过测试的计数,但找不到任何方法来获取测试用例名称。 提前谢谢
from robot.api import ExecutionResult
result = ExecutionResult('output.xml')
result.configure(stat_config={'suite_stat_level': 2,
'tag_stat_combine': 'tagANDanother'})
stats = result.statistics
print stats.total.critical.failed
print stats.total.critical.passed
print stats.tags.combined[0].total
可能您需要
ResultVisitor
。这样做应该会有所帮助:文件可在https://robot-framework.readthedocs.io/en/v3.1.2/autodoc/robot.result.html#module-robot.result.visitor找到
相关问题 更多 >
编程相关推荐