cumulusci.tasks.robotframework package


class cumulusci.tasks.robotframework.libdoc.KeywordFile(path)[source]

Bases: object

Helper class which represents a file and its keywords

A file may have just a bunch of keywords, or groups of keywords organized as page objects. Each group of keywords is stored in self.keywords, with the page object metadata as a key.

For normal libraries, the key is an empty tuple.

add_keywords(libdoc, page_object=())[source]
class cumulusci.tasks.robotframework.libdoc.RobotLibDoc(project_config, task_config, org_config=None, flow=None, name=None, stepnum=None, **kwargs)[source]

Bases: cumulusci.core.tasks.BaseTask


Return True if the file looks like a page object library

task_options = {'output': {'description': 'The output file where the documentation will be written', 'required': True}, 'path': {'description': 'The path to one or more keyword libraries to be documented. The path can be single a python file, a .robot file, a python module (eg: cumulusci.robotframework.Salesforce) or a comma separated list of any of those. Glob patterns are supported for filenames (eg: robot/SAL/doc/* The order of the files will be preserved in the generated documentation. The result of pattern expansion will be sorted', 'required': True}, 'title': {'description': 'A string to use as the title of the generated output', 'required': False}}
class cumulusci.tasks.robotframework.lint.CustomRfLint(task)[source]

Bases: rflint.rflint.RfLint

Wrapper around RfLint to support using the task logger


Print a list of all rules

report(linenumber, filename, severity, message, rulename, char)[source]

Report a rule violation

class cumulusci.tasks.robotframework.lint.RobotLint(project_config, task_config, org_config=None, flow=None, name=None, stepnum=None, **kwargs)[source]

Bases: cumulusci.core.tasks.BaseTask

task_docs = "\n The robot_lint task performs static analysis on one or more .robot\n and .resource files. Each line is parsed, and the result passed through\n a series of rules. Rules can issue warnings or errors about each line.\n\n If any errors are reported, the task will exit with a non-zero status.\n\n When a rule has been violated, a line will appear on the output in\n the following format:\n\n *<severity>*: *<line>*, *<character>*: *<description>* (*<name>*)\n\n - *<severity>* will be either W for warning or E for error\n - *<line>* is the line number where the rule was triggered\n - *<character>* is the character where the rule was triggered,\n or 0 if the rule applies to the whole line\n - *<description>* is a short description of the issue\n - *<name>* is the name of the rule that raised the issue\n\n Note: the rule name can be used with the ignore, warning, error,\n and configure options.\n\n Some rules are configurable, and can be configured with the\n `configure` option. This option takes a list of values in the form\n *<rule>*:*<value>*,*<rule>*:*<value>*,etc. For example, to set\n the line length for the LineTooLong rule you can use '-o configure\n LineTooLong:80'. If a rule is configurable, it will show the\n configuration options in the documentation for that rule\n\n The filename will be printed once before any errors or warnings\n for that file. The filename is preceeded by `+`\n\n Example Output::\n\n + example.robot\n W: 2, 0: No suite documentation (RequireSuiteDocumentation)\n E: 30, 0: No testcase documentation (RequireTestDocumentation)\n\n To see a list of all configured options, set the 'list' option to True:\n\n cci task run robot_list -o list True\n\n "
task_options = {'configure': {'default': None, 'description': 'List of rule configuration values, in the form of rule:args.'}, 'error': {'default': None, 'description': "List of rules to treat as errors. Use 'all' to affect all rules."}, 'ignore': {'default': None, 'description': "List of rules to ignore. Use 'all' to ignore all rules"}, 'list': {'default': None, 'description': 'If option is True, print a list of known rules instead of processing files.'}, 'path': {'description': 'The path to one or more files or folders. If the path includes wildcard characters, they will be expanded. If not provided, the default will be to process all files under robot/<project name>', 'required': False}, 'warning': {'default': None, 'description': "List of rules to treat as warnings. Use 'all' to affect all rules."}}
class cumulusci.tasks.robotframework.robotframework.KeywordLogger[source]

Bases: object

start_keyword(name, attrs)[source]
class cumulusci.tasks.robotframework.robotframework.Robot(project_config, task_config, org_config=None, flow=None, name=None, stepnum=None, **kwargs)[source]

Bases: cumulusci.tasks.salesforce.BaseSalesforceTask.BaseSalesforceTask

task_options = {'debug': {'description': 'If true, enable the `breakpoint` keyword to enable the robot debugger'}, 'exclude': {'description': 'Excludes tests with a given tag'}, 'include': {'description': 'Includes tests with a given tag'}, 'name': {'description': 'Sets the name of the top level test suite'}, 'options': {'description': 'A dictionary of options to method. See docs here for format. NOTE: There is no cci CLI support for this option since it requires a dictionary. Use this option in the cumulusci.yml when defining custom tasks where you can easily create a dictionary in yaml.'}, 'pdb': {'description': 'If true, run the Python debugger when tests fail.'}, 'suites': {'description': 'Paths to test case files/directories to be executed similarly as when running the robot command on the command line. Defaults to "tests" to run all tests in the tests directory', 'required': True}, 'test': {'description': 'Run only tests matching name patterns. Can be comma separated and use robot wildcards like *'}, 'vars': {'description': 'Pass values to override variables in the format VAR1:foo,VAR2:bar'}, 'verbose': {'description': 'If true, log each keyword as it runs.'}, 'xunit': {'description': 'Set an XUnit format output file for test results'}}
class cumulusci.tasks.robotframework.robotframework.RobotTestDoc(project_config, task_config, org_config=None, flow=None, name=None, stepnum=None, **kwargs)[source]

Bases: cumulusci.core.tasks.BaseTask

task_options = {'output': {'description': 'The output html file where the documentation will be written', 'required': True}, 'path': {'description': 'The path containing .robot test files', 'required': True}}

Monkey patch robotframework to do postmortem debugging

Module contents