Represents results of a single test suite. More...
Public Member Functions | |
| def | __init__ (self, name='', doc='', metadata=None, source=None, message='', starttime=None, endtime=None, rpa=False, parent=None) |
| def | configure (self, **options) |
| A shortcut to configure a suite using one method call. More... | |
| def | filter_messages (self, log_level='TRACE') |
Remove log messages below the specified log_level. More... | |
| def | handle_suite_teardown_failures (self) |
| Internal usage only. More... | |
| def | remove_keywords (self, how) |
| Remove keywords based on the given condition. More... | |
| def | suite_teardown_failed (self, error) |
| Internal usage only. More... | |
| def | suite_teardown_skipped (self, message) |
| Internal usage only. More... | |
Public Member Functions inherited from robot.model.testsuite.TestSuite | |
| def | __init__ (self, name='', doc='', metadata=None, source=None, rpa=False, parent=None) |
| def | __str__ (self) |
| def | filter (self, included_suites=None, included_tests=None, included_tags=None, excluded_tags=None) |
| Select test cases and remove others from this suite. More... | |
| def | metadata (self, metadata) |
| Free test suite metadata as a dictionary. More... | |
| def | remove_empty_suites (self, preserve_direct_children=False) |
| Removes all child suites not containing any tests, recursively. More... | |
| def | set_tags (self, add=None, remove=None, persist=False) |
| Add and/or remove specified tags to the tests in this suite. More... | |
| def | suites (self, suites) |
Child suites as a :class:~.TestSuites object. More... | |
| def | tests (self, tests) |
Tests as a :class:~.TestCases object. More... | |
| def | visit (self, visitor) |
:mod:Visitor interface <robot.model.visitor> entry-point. More... | |
Public Member Functions inherited from robot.model.modelobject.ModelObject | |
| def | __repr__ (self) |
| def | config (self, **attributes) |
| Configure model object with given attributes. More... | |
| def | copy (self, **attributes) |
| Return shallow copy of this object. More... | |
| def | deepcopy (self, **attributes) |
| Return deep copy of this object. More... | |
Public Attributes | |
| endtime | |
| message | |
| starttime | |
Public Attributes inherited from robot.model.testsuite.TestSuite | |
| doc | |
| metadata | |
| parent | |
| rpa | |
| source | |
| suites | |
| tests | |
Public Attributes inherited from robot.result.model.StatusMixin | |
| status | |
Static Public Attributes | |
| fixture_class = Keyword | |
| test_class = TestCase | |
Static Public Attributes inherited from robot.model.testsuite.TestSuite | |
| fixture_class = Keyword | |
| tuple | repr_args = ('name',) |
| test_class = TestCase | |
Static Public Attributes inherited from robot.model.modelobject.ModelObject | |
| tuple | repr_args = () |
Static Public Attributes inherited from robot.result.model.StatusMixin | |
| string | FAIL = 'FAIL' |
| string | NOT_RUN = 'NOT RUN' |
| string | NOT_SET = 'NOT SET' |
| string | PASS = 'PASS' |
| string | SKIP = 'SKIP' |
Properties | |
| elapsedtime = property | |
| Total execution time in milliseconds. More... | |
| failed = property | |
True if any test has failed, False otherwise. More... | |
| full_message = property | |
Combination of :attr:message and :attr:stat_message. More... | |
| not_run = property | |
| passed = property | |
True if no test has failed but some have passed, False otherwise. More... | |
| skipped = property | |
True if there are no passed or failed tests, False otherwise. More... | |
| stat_message = property | |
String representation of the :attr:statistics. More... | |
| statistics = property | |
Suite statistics as a :class:~robot.model.totalstatistics.TotalStatistics object. More... | |
| status = property | |
| 'PASS', 'FAIL' or 'SKIP' depending on test statuses. More... | |
Properties inherited from robot.model.testsuite.TestSuite | |
| _visitors = property | |
| has_setup = property | |
| Check does a suite have a setup without creating a setup object. More... | |
| has_teardown = property | |
| Check does a suite have a teardown without creating a teardown object. More... | |
| has_tests = property | |
| id = property | |
| An automatically generated unique id. More... | |
| keywords = property | |
| Deprecated since Robot Framework 4.0. More... | |
| longname = property | |
| Suite name prefixed with the long name of the parent suite. More... | |
| name = property | |
| Test suite name. More... | |
| setup = property | |
Suite setup as a :class:~.model.keyword.Keyword object. More... | |
| teardown = property | |
Suite teardown as a :class:~.model.keyword.Keyword object. More... | |
| test_count = property | |
| Number of the tests in this suite, recursively. More... | |
Properties inherited from robot.result.model.StatusMixin | |
| elapsedtime = property | |
| Total execution time in milliseconds. More... | |
| failed = property | |
True when :attr:status is 'FAIL', False otherwise. More... | |
| not_run = property | |
True when :attr:status is 'NOT RUN', False otherwise. More... | |
| passed = property | |
True when :attr:status is 'PASS', False otherwise. More... | |
| skipped = property | |
True when :attr:status is 'SKIP', False otherwise. More... | |
Private Member Functions | |
| def | elapsedtime (self) |
| def | failed (self) |
| def | full_message (self) |
| def | not_run (self) |
| def | passed (self) |
| def | skipped (self) |
| def | stat_message (self) |
| def | statistics (self) |
| def | status (self) |
Static Private Attributes | |
| list | __slots__ = ['message', 'starttime', 'endtime'] |
Represents results of a single test suite.
See the base class for documentation of attributes not documented here.
| def robot.result.model.TestSuite.__init__ | ( | self, | |
name = '', |
|||
doc = '', |
|||
metadata = None, |
|||
source = None, |
|||
message = '', |
|||
starttime = None, |
|||
endtime = None, |
|||
rpa = False, |
|||
parent = None |
|||
| ) |
| def robot.result.model.TestSuite.configure | ( | self, | |
| ** | options | ||
| ) |
A shortcut to configure a suite using one method call.
Can only be used with the root test suite.
:param options: Passed to
:class:`~robot.result.configurer.SuiteConfigurer` that will then
set suite attributes, call :meth:`filter`, etc. as needed.
Example::
suite.configure(remove_keywords='PASSED',
doc='Smoke test results.')
Not to be confused with :meth:`config` method that suites, tests,
and keywords have to make it possible to set multiple attributes in
one call.
Reimplemented from robot.model.testsuite.TestSuite.
|
private |
Reimplemented from robot.result.model.StatusMixin.
|
private |
Reimplemented from robot.result.model.StatusMixin.
| def robot.result.model.TestSuite.filter_messages | ( | self, | |
log_level = 'TRACE' |
|||
| ) |
|
private |
| def robot.result.model.TestSuite.handle_suite_teardown_failures | ( | self | ) |
|
private |
Reimplemented from robot.result.model.StatusMixin.
|
private |
Reimplemented from robot.result.model.StatusMixin.
| def robot.result.model.TestSuite.remove_keywords | ( | self, | |
| how | |||
| ) |
Remove keywords based on the given condition.
:param how: What approach to use when removing keywords. Either
``ALL``, ``PASSED``, ``FOR``, ``WUKS``, or ``NAME:<pattern>``.
For more information about the possible values see the documentation
of the ``--removekeywords`` command line option.
|
private |
Reimplemented from robot.result.model.StatusMixin.
|
private |
|
private |
| def robot.result.model.TestSuite.suite_teardown_failed | ( | self, | |
| error | |||
| ) |
| def robot.result.model.TestSuite.suite_teardown_skipped | ( | self, | |
| message | |||
| ) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Suite statistics as a :class:~robot.model.totalstatistics.TotalStatistics object.
Recreated every time this property is accessed, so saving the results
to a variable and inspecting it is often a good idea::
stats = suite.statistics
print(stats.failed)
print(stats.total)
print(stats.message)
|
static |
'PASS', 'FAIL' or 'SKIP' depending on test statuses.
- If any test has failed, status is 'FAIL'.
- If no test has failed but at least some test has passed, status is 'PASS'.
- If there are no failed or passed tests, status is 'SKIP'. This covers both
the case when all tests have been skipped and when there are no tests.