def generate_docs(test_module: str, test_design: str) -> None:
    """Generate documentation.

    This function uses robot libdoc and robot testdoc to generates
    documentation of custom keyword library and test cases documentations,
    base on module and test domain.

    Parameters
    ----------
    test_module : str
        Test module {mobile_app, web_portal, rest_api}
    test_design : str
        Test domain specification

    Returns
    -------
    None
    """
    packages = get_module_children(module_name=test_module)
    test_suite = f'{packages["test_design"]}/{test_design}'
    robot_file = f'{test_suite}/{test_design}.robot'
    keywords_file = f'{packages["lib"]}/common_keywords.py'

    doc_out_file = f'{inter_path().current_doc_folder}/\
{test_design}_document.html'
    lib_out_file = f'{inter_path().current_doc_folder}/keywords_document.html'

    libdoc(library_or_resource=keywords_file, outfile=lib_out_file,
           name='', version='', format=None, docformat='HTML')
    testdoc(robot_file, doc_out_file, title='',
            name='', version='', format=None, docformat='HTML')
    return
Example #2
0
def tests(pathlist, input_base: Path, docs_base: Path):
    for path in pathlist:
        input_path, docs_path, name, version = paths(path, input_base,
                                                     docs_base)
        if is_input_newer(input_path, docs_path):
            logging.getLogger('rfdocgen').debug('tests: %s\n\t%s\n\t=> %s' %
                                                (name, input_path, docs_path))
            with redirect_stdout(None):
                testdoc.testdoc(input_path,
                                docs_path,
                                name=name,
                                version=version)
Example #3
0
 def _run_task(self):
     return testdoc(self.options["path"], self.options["output"])
 def _run_task(self):
     return testdoc(self.options["path"], self.options["output"])
Example #5
0
 def _run_task(self):
     return testdoc(
         self.options['path'],
         self.options['output'],
     )