【问题标题】:Generate Robot Framework documentation for test cases为测试用例生成 Robot Framework 文档
【发布时间】:2018-12-14 10:17:23
【问题描述】:

有没有办法为测试用例生成 Robot Framework 文档?

我可以使用 libdoc 成功地为关键字和库生成文档,但是当我尝试对仅包含测试用例的 .robot 文件执行相同操作时,我收到以下错误。

测试用例文件:

*** Settings ***
Documentation   Suite documentation to appear on top of the html doc.
Resource        ../Root.robot

Suite Setup     Create Data
Suite Teardown  Delete Data
Test Setup      Go To Homepage
Test Teardown   Close All Browsers

*** Test Cases ***
Test A
    [Documentation]  The test case documentation.
    Do Something

在此文件上使用libdoc 时出错:

Try --help for usage information.
[ ERROR ] Error in file '/<path>Test.robot': Non-existing setting 'Test Setup'.
[ ERROR ] Error in file '/<path>Test.robot': Non-existing setting 'Test Teardown'.
[ ERROR ] Error in file '/<path>Test.robot': Non-existing setting 'Suite Setup'.
[ ERROR ] Error in file '/<path>Test.robot': Non-existing setting 'Suite Teardown'.
Resource file '/<path>Test.robot' contains a test case table which is not allowed.

是不是因为 libdoc 不支持设置和拆解?

【问题讨论】:

标签: robotframework


【解决方案1】:

对于测试用例文档,应该使用TestDoc 而不是LibDoc

这里有两个工具: http://robotframework.org/robotframework/#built-in-tools

【讨论】:

    猜你喜欢
    • 2018-06-05
    • 2019-04-03
    • 2020-07-12
    • 2016-05-05
    • 2014-02-27
    • 2014-06-18
    • 1970-01-01
    • 2016-01-13
    • 2017-08-08
    相关资源
    最近更新 更多