robot.conf package

Implements settings for both test execution and output processing.

This package implements RobotSettings and RebotSettings classes used internally by the framework. There should be no need to use these classes externally.

This package can be considered relatively stable. Aforementioned classes are likely to be rewritten at some point to be more convenient to use. Instantiating them is not likely to change, though.

Submodules

robot.conf.gatherfailed module

class robot.conf.gatherfailed.GatherFailedTests[source]

Bases: robot.model.visitor.SuiteVisitor

visit_test(test)[source]

Implements traversing through tests.

Can be overridden to allow modifying the passed in test without calling start_test() or end_test() nor visiting the body of the test.

visit_keyword(kw)[source]

Implements traversing through keywords.

Can be overridden to allow modifying the passed in kw without calling start_keyword() or end_keyword() nor visiting the body of the keyword

end_body_item(item)

Called, by default, when keywords, messages or control structures end.

More specific end_keyword(), end_message(), :meth:`end_for, etc. can be implemented to visit only keywords, messages or specific control structures.

Default implementation does nothing.

end_break(break_)

Called when a BREAK element ends.

By default, calls end_body_item() which, by default, does nothing.

end_continue(continue_)

Called when a CONTINUE element ends.

By default, calls end_body_item() which, by default, does nothing.

end_for(for_)

Called when a FOR loop ends.

By default, calls end_body_item() which, by default, does nothing.

end_for_iteration(iteration)

Called when a FOR loop iteration ends.

By default, calls end_body_item() which, by default, does nothing.

end_if(if_)

Called when an IF/ELSE structure ends.

By default, calls end_body_item() which, by default, does nothing.

end_if_branch(branch)

Called when an IF/ELSE branch ends.

By default, calls end_body_item() which, by default, does nothing.

end_keyword(keyword)

Called when a keyword ends.

By default, calls end_body_item() which, by default, does nothing.

end_message(msg)

Called when a message ends.

By default, calls end_body_item() which, by default, does nothing.

end_return(return_)

Called when a RETURN element ends.

By default, calls end_body_item() which, by default, does nothing.

end_suite(suite)

Called when a suite ends. Default implementation does nothing.

end_test(test)

Called when a test ends. Default implementation does nothing.

end_try(try_)

Called when a TRY/EXCEPT structure ends.

By default, calls end_body_item() which, by default, does nothing.

end_try_branch(branch)

Called when TRY, EXCEPT, ELSE and FINALLY branches end.

By default, calls end_body_item() which, by default, does nothing.

end_while(while_)

Called when a WHILE loop ends.

By default, calls end_body_item() which, by default, does nothing.

end_while_iteration(iteration)

Called when a WHILE loop iteration ends.

By default, calls end_body_item() which, by default, does nothing.

start_body_item(item)

Called, by default, when keywords, messages or control structures start.

More specific start_keyword(), start_message(), :meth:`start_for, etc. can be implemented to visit only keywords, messages or specific control structures.

Can return explicit False to stop visiting. Default implementation does nothing.

start_break(break_)

Called when a BREAK element starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_continue(continue_)

Called when a CONTINUE element starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_for(for_)

Called when a FOR loop starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_for_iteration(iteration)

Called when a FOR loop iteration starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_if(if_)

Called when an IF/ELSE structure starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_if_branch(branch)

Called when an IF/ELSE branch starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_keyword(keyword)

Called when a keyword starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_message(msg)

Called when a message starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_return(return_)

Called when a RETURN element starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_suite(suite)

Called when a suite starts. Default implementation does nothing.

Can return explicit False to stop visiting.

start_test(test)

Called when a test starts. Default implementation does nothing.

Can return explicit False to stop visiting.

start_try(try_)

Called when a TRY/EXCEPT structure starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_try_branch(branch)

Called when TRY, EXCEPT, ELSE or FINALLY branches start.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_while(while_)

Called when a WHILE loop starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_while_iteration(iteration)

Called when a WHILE loop iteration starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

visit_break(break_)

Visits BREAK elements.

visit_continue(continue_)

Visits CONTINUE elements.

visit_for(for_)

Implements traversing through FOR loops.

Can be overridden to allow modifying the passed in for_ without calling start_for() or end_for() nor visiting body.

visit_for_iteration(iteration)

Implements traversing through single FOR loop iteration.

This is only used with the result side model because on the running side there are no iterations.

Can be overridden to allow modifying the passed in iteration without calling start_for_iteration() or end_for_iteration() nor visiting body.

visit_if(if_)

Implements traversing through IF/ELSE structures.

Notice that if_ does not have any data directly. Actual IF/ELSE branches are in its body and visited using visit_if_branch().

Can be overridden to allow modifying the passed in if_ without calling start_if() or end_if() nor visiting branches.

visit_if_branch(branch)

Implements traversing through single IF/ELSE branch.

Can be overridden to allow modifying the passed in branch without calling start_if_branch() or end_if_branch() nor visiting body.

visit_message(msg)

Implements visiting messages.

Can be overridden to allow modifying the passed in msg without calling start_message() or end_message().

visit_return(return_)

Visits a RETURN elements.

visit_suite(suite)

Implements traversing through suites.

Can be overridden to allow modifying the passed in suite without calling start_suite() or end_suite() nor visiting child suites, tests or setup and teardown at all.

visit_try(try_)

Implements traversing through TRY/EXCEPT structures.

This method is used with the TRY/EXCEPT root element. Actual TRY, EXCEPT, ELSE and FINALLY branches are visited separately using visit_try_branch().

visit_try_branch(branch)

Visits individual TRY, EXCEPT, ELSE and FINALLY branches.

visit_while(while_)

Implements traversing through WHILE loops.

Can be overridden to allow modifying the passed in while_ without calling start_while() or end_while() nor visiting body.

visit_while_iteration(iteration)

Implements traversing through single WHILE loop iteration.

This is only used with the result side model because on the running side there are no iterations.

Can be overridden to allow modifying the passed in iteration without calling start_while_iteration() or end_while_iteration() nor visiting body.

class robot.conf.gatherfailed.GatherFailedSuites[source]

Bases: robot.model.visitor.SuiteVisitor

start_suite(suite)[source]

Called when a suite starts. Default implementation does nothing.

Can return explicit False to stop visiting.

visit_test(test)[source]

Implements traversing through tests.

Can be overridden to allow modifying the passed in test without calling start_test() or end_test() nor visiting the body of the test.

visit_keyword(kw)[source]

Implements traversing through keywords.

Can be overridden to allow modifying the passed in kw without calling start_keyword() or end_keyword() nor visiting the body of the keyword

end_body_item(item)

Called, by default, when keywords, messages or control structures end.

More specific end_keyword(), end_message(), :meth:`end_for, etc. can be implemented to visit only keywords, messages or specific control structures.

Default implementation does nothing.

end_break(break_)

Called when a BREAK element ends.

By default, calls end_body_item() which, by default, does nothing.

end_continue(continue_)

Called when a CONTINUE element ends.

By default, calls end_body_item() which, by default, does nothing.

end_for(for_)

Called when a FOR loop ends.

By default, calls end_body_item() which, by default, does nothing.

end_for_iteration(iteration)

Called when a FOR loop iteration ends.

By default, calls end_body_item() which, by default, does nothing.

end_if(if_)

Called when an IF/ELSE structure ends.

By default, calls end_body_item() which, by default, does nothing.

end_if_branch(branch)

Called when an IF/ELSE branch ends.

By default, calls end_body_item() which, by default, does nothing.

end_keyword(keyword)

Called when a keyword ends.

By default, calls end_body_item() which, by default, does nothing.

end_message(msg)

Called when a message ends.

By default, calls end_body_item() which, by default, does nothing.

end_return(return_)

Called when a RETURN element ends.

By default, calls end_body_item() which, by default, does nothing.

end_suite(suite)

Called when a suite ends. Default implementation does nothing.

end_test(test)

Called when a test ends. Default implementation does nothing.

end_try(try_)

Called when a TRY/EXCEPT structure ends.

By default, calls end_body_item() which, by default, does nothing.

end_try_branch(branch)

Called when TRY, EXCEPT, ELSE and FINALLY branches end.

By default, calls end_body_item() which, by default, does nothing.

end_while(while_)

Called when a WHILE loop ends.

By default, calls end_body_item() which, by default, does nothing.

end_while_iteration(iteration)

Called when a WHILE loop iteration ends.

By default, calls end_body_item() which, by default, does nothing.

start_body_item(item)

Called, by default, when keywords, messages or control structures start.

More specific start_keyword(), start_message(), :meth:`start_for, etc. can be implemented to visit only keywords, messages or specific control structures.

Can return explicit False to stop visiting. Default implementation does nothing.

start_break(break_)

Called when a BREAK element starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_continue(continue_)

Called when a CONTINUE element starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_for(for_)

Called when a FOR loop starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_for_iteration(iteration)

Called when a FOR loop iteration starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_if(if_)

Called when an IF/ELSE structure starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_if_branch(branch)

Called when an IF/ELSE branch starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_keyword(keyword)

Called when a keyword starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_message(msg)

Called when a message starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_return(return_)

Called when a RETURN element starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_test(test)

Called when a test starts. Default implementation does nothing.

Can return explicit False to stop visiting.

start_try(try_)

Called when a TRY/EXCEPT structure starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_try_branch(branch)

Called when TRY, EXCEPT, ELSE or FINALLY branches start.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_while(while_)

Called when a WHILE loop starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

start_while_iteration(iteration)

Called when a WHILE loop iteration starts.

By default, calls start_body_item() which, by default, does nothing.

Can return explicit False to stop visiting.

visit_break(break_)

Visits BREAK elements.

visit_continue(continue_)

Visits CONTINUE elements.

visit_for(for_)

Implements traversing through FOR loops.

Can be overridden to allow modifying the passed in for_ without calling start_for() or end_for() nor visiting body.

visit_for_iteration(iteration)

Implements traversing through single FOR loop iteration.

This is only used with the result side model because on the running side there are no iterations.

Can be overridden to allow modifying the passed in iteration without calling start_for_iteration() or end_for_iteration() nor visiting body.

visit_if(if_)

Implements traversing through IF/ELSE structures.

Notice that if_ does not have any data directly. Actual IF/ELSE branches are in its body and visited using visit_if_branch().

Can be overridden to allow modifying the passed in if_ without calling start_if() or end_if() nor visiting branches.

visit_if_branch(branch)

Implements traversing through single IF/ELSE branch.

Can be overridden to allow modifying the passed in branch without calling start_if_branch() or end_if_branch() nor visiting body.

visit_message(msg)

Implements visiting messages.

Can be overridden to allow modifying the passed in msg without calling start_message() or end_message().

visit_return(return_)

Visits a RETURN elements.

visit_suite(suite)

Implements traversing through suites.

Can be overridden to allow modifying the passed in suite without calling start_suite() or end_suite() nor visiting child suites, tests or setup and teardown at all.

visit_try(try_)

Implements traversing through TRY/EXCEPT structures.

This method is used with the TRY/EXCEPT root element. Actual TRY, EXCEPT, ELSE and FINALLY branches are visited separately using visit_try_branch().

visit_try_branch(branch)

Visits individual TRY, EXCEPT, ELSE and FINALLY branches.

visit_while(while_)

Implements traversing through WHILE loops.

Can be overridden to allow modifying the passed in while_ without calling start_while() or end_while() nor visiting body.

visit_while_iteration(iteration)

Implements traversing through single WHILE loop iteration.

This is only used with the result side model because on the running side there are no iterations.

Can be overridden to allow modifying the passed in iteration without calling start_while_iteration() or end_while_iteration() nor visiting body.

robot.conf.gatherfailed.gather_failed_tests(output, empty_suite_ok=False)[source]
robot.conf.gatherfailed.gather_failed_suites(output, empty_suite_ok=False)[source]

robot.conf.settings module

class robot.conf.settings.RobotSettings(options=None, **extra_options)[source]

Bases: robot.conf.settings._BaseSettings

get_rebot_settings()[source]
listeners
debug_file
suite_config
suite_names
test_names
randomize_seed
randomize_suites
randomize_tests
dry_run
exit_on_failure
exit_on_error
skip
skipped_tags
skip_on_failure
skip_teardown_on_exit
console_output_config
console_type
console_width
console_markers
max_error_lines
max_assign_length
pre_run_modifiers
run_empty_suite
variables
variable_files
extension
console_colors
exclude
flatten_keywords
include
log
log_level
output
output_directory
pre_rebot_modifiers
pythonpath
remove_keywords
report
rpa
split_log
statistics_config
status_rc
xunit
class robot.conf.settings.RebotSettings(options=None, **extra_options)[source]

Bases: robot.conf.settings._BaseSettings

suite_config
log_config
report_config
merge
console_output_config
console_colors
exclude
flatten_keywords
include
log
log_level
output
output_directory
pre_rebot_modifiers
process_empty_suite
pythonpath
remove_keywords
report
rpa
split_log
statistics_config
status_rc
suite_names
test_names
xunit
expand_keywords