Latex 如何使用sphinx生成robot文件的文档?
我有一个robot文件(calc_check.robot),其中每个测试用例都有单独的文档Latex 如何使用sphinx生成robot文件的文档?,latex,robotframework,python-sphinx,pdflatex,Latex,Robotframework,Python Sphinx,Pdflatex,我有一个robot文件(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]
*** 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)为robot文件生成文档时,我也得到了完整的测试用例和文档,但我只需要“[文档]”部分
calc_check
======================================
.. robot-settings::
:source:/Users/sphinx/calc_check.robot
.. robot-tests::
:source:/Users/sphinx/calc_check.robot
我需要两个测试用例的文档(即,只有测试用例的[文档]部分),不包括测试用例代码
请告诉我如何仅生成其中的文档部分。Robot提供名为libdoc的文档生成库: 问题是它只为库和资源文件(那些没有***Testcase***部分的文件)生成 如果您需要从测试套件生成文档,我建议您将测试套件临时更改为资源文件(将部分更改为关键字),并为此类文件运行libdoc:
python -m robot.libdoc <path to res/lib> <list/show>
python-m robot.libdoc
我正在使用Sphinx“make html”命令生成文档,因此请建议我在.rst文件中进行更改。因此,它将只生成robot的文档部分。请添加您认识的可以提供帮助的人。提前感谢。您是否使用sphinx的扩展来支持robot框架文件?您说您有一个名为calc\u check.robot
的robot文件,但正在将sphinx与call\u check.rst
一起使用。如何从.robot文件创建.rst文件?