我有一个机器人文件(calc_check.robot),其中每个测试用例都有单独的文档说明。
*** Settings ***
Documentation
... The test cases are designed to test the calculator .
Library ../../Library/AddNumbers
*** Test Cases ***
Calc_check_test Testcase01_a
[Documentation]
... Verify that two numbers are added or not
[Tags] add calculator
${addition}= Add numbers 10 20
Calc_check_test Testcase01_b
[Documentation]
... Verify that two numbers are added or not with negative sign
[Tags] add calculator
${addition}= Add numbers 10 -20
当我尝试使用rst文件(call_check.rst)为机器人文件生成文档时,我得到了完整的测试案例和文档,但我只需要"[Documentation]"部分。
calc_check
======================================
.. robot-settings::
:source:/Users/sphinx/calc_check.robot
.. robot-tests::
:source:/Users/sphinx/calc_check.robot
我希望从两个测试用例中提取文档部分(即只提取[test Case]的文档部分),而不包括测试用例代码。
请告诉我如何仅生成其文档部分。
calc_check.robot
的robot文件,但是正在使用sphinx
与call_check.rst
。你是如何从.robot
文件创建.rst
文件的呢? - Bryan Oakley