robot.running.builder package¶
Submodules¶
robot.running.builder.builders module¶
-
class
robot.running.builder.builders.TestSuiteBuilder(included_suites=None, included_extensions=('robot', ), rpa=None, allow_empty_suite=False, process_curdir=True)[source]¶ Bases:
objectBuilder to construct
TestSuiteobjects based on data on the disk.The
build()method constructs executableTestSuiteobjects based on test data files or directories. There are two main use cases for this API:- Execute the created suite by using its
run()method. The suite can be can be modified before execution if needed. - Inspect the suite to see, for example, what tests it has or what tags
tests have. This can be more convenient than using the lower level
parsingAPIs but does not allow saving modified data back to the disk.
Both modifying the suite and inspecting what data it contains are easiest done by using the
visitorinterface.This class is part of the public API and should be imported via the
robot.apipackage.Parameters: - include_suites – List of suite names to include. If
Noneor an empty list, all suites are included. Same as using--suiteon the command line. - included_extensions – List of extensions of files to parse. Same as
--extension. This parameter was namedextensionbefore RF 3.2. - rpa – Explicit test execution mode.
Truefor RPA andFalsefor test automation. By default mode is got from test data headers and possible conflicting headers cause an error. Same as--rpaor--norpa. - allow_empty_suite – Specify is it an error if the built suite contains no tests.
Same as
--runemptysuite. New in RF 3.2. - process_curdir – Control processing the special
${CURDIR}variable. It is resolved already at parsing time by default, but that can be changed by giving this argumentFalsevalue. New in RF 3.2.
- Execute the created suite by using its
-
class
robot.running.builder.builders.SuiteStructureParser(included_extensions, rpa=None, process_curdir=True)[source]¶ Bases:
robot.parsing.suitestructure.SuiteStructureVisitor-
visit_directory(structure)¶
-
robot.running.builder.parsers module¶
-
class
robot.running.builder.parsers.RestParser(process_curdir=True)[source]¶ Bases:
robot.running.builder.parsers.RobotParser-
build_suite(model, name=None, defaults=None)¶
-
parse_init_file(source, defaults=None)¶
-
parse_resource_file(source)¶
-
parse_suite_file(source, defaults=None)¶
-
-
class
robot.running.builder.parsers.NoInitFileDirectoryParser[source]¶ Bases:
robot.running.builder.parsers.BaseParser-
parse_resource_file(source)¶
-
parse_suite_file(source, defaults=None)¶
-
robot.running.builder.testsettings module¶
robot.running.builder.transformers module¶
-
class
robot.running.builder.transformers.SettingsBuilder(suite, test_defaults)[source]¶ Bases:
ast.NodeVisitor-
generic_visit(node)¶ Called if no explicit visitor function exists for a node.
-
visit(node)¶ Visit a node.
-
-
class
robot.running.builder.transformers.SuiteBuilder(suite, test_defaults)[source]¶ Bases:
ast.NodeVisitor-
generic_visit(node)¶ Called if no explicit visitor function exists for a node.
-
visit(node)¶ Visit a node.
-
-
class
robot.running.builder.transformers.ResourceBuilder(resource)[source]¶ Bases:
ast.NodeVisitor-
generic_visit(node)¶ Called if no explicit visitor function exists for a node.
-
visit(node)¶ Visit a node.
-
-
class
robot.running.builder.transformers.TestCaseBuilder(suite, defaults)[source]¶ Bases:
ast.NodeVisitor-
generic_visit(node)¶ Called if no explicit visitor function exists for a node.
-
visit(node)¶ Visit a node.
-