Revision: 39d4b5186e64
Author: Janne Härkönen <[email protected]>
Date: Thu Feb 23 06:11:30 2012
Log: testdoc: commandline and API doc
http://code.google.com/p/robotframework/source/detail?r=39d4b5186e64
Modified:
/src/robot/testdoc.py
=======================================
--- /src/robot/testdoc.py Thu Feb 23 05:40:26 2012
+++ /src/robot/testdoc.py Thu Feb 23 06:11:30 2012
@@ -14,9 +14,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-USAGE = """Robot Framework Test Data Documentation Tool
-
-Usage: testdoc.py [options] data_sources
+USAGE = """robot.testdoc -- Robot Framework test data documentation tool
+
+Version: <VERSION>
+
+Usage: python -m robot.testdoc [options] data_sources output_file
This tool generates a high level test documentation from a given test data.
Generated documentation includes the names, documentations and other
metadata
@@ -24,22 +26,26 @@
arguments. Most of the options accepted by this tool have exactly same
semantics as same options have when executing test cases.
-Options:
+Options
+=======
+
-T --title title Set the title of the generated documentation.
Underscores in the title are converted to spaces.
-N --name name Set the name of the top level test suite.
- -D --doc document Set the document of the top level test suite.
+ -D --doc document Set the documentation of the top level test suite.
-M --metadata name:value * Set metadata of the top level test suite.
-G --settag tag * Set given tag(s) to all test cases.
-t --test name * Include test cases by name.
-s --suite name * Include test suites by name.
-i --include tag * Include test cases by tags.
-e --exclude tag * Exclude test cases by tags.
- -h --help Print this help.
-
-Examples:
- $ testdoc.py mytestcases.html testdoc.html
- $ testdoc.py --name smoke_test_plan --include smoke path/to/my_tests/
doc.html
+ -h -? --help Print this help.
+
+Examples
+========
+
+ python .m robot.testdoc mytestcases.html testdoc.html
+ python .m robot.testdoc --name smoke_test_plan -i smoke
path/to/my_tests/ doc.html
"""
import sys
@@ -164,6 +170,13 @@
def testdoc_cli(args):
+ """Executes testdoc similarly as from the command line.
+
+ :param args: command line arguments as a list of strings.
+
+ Example:
+ testdoc_cli(['--title', 'Test Plan', 'mytests', 'plan.html'])
+ """
TestDoc().execute_cli(args)