Robot Framework Integrated Development Environment (RIDE)
robotide.lib.robot.result.model.TestSuite Class Reference

Represents results of a single test suite. More...

Inheritance diagram for robotide.lib.robot.result.model.TestSuite:
robotide.lib.robot.model.testsuite.TestSuite robotide.lib.robot.model.modelobject.ModelObject object

Public Member Functions

def __init__ (self, name='', doc='', metadata=None, source=None, message='', starttime=None, endtime=None, rpa=False)
 
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 set_criticality (self, critical_tags=None, non_critical_tags=None)
 Sets which tags are considered critical and which non-critical. More...
 
def suite_teardown_failed (self, message)
 Internal usage only. More...
 
- Public Member Functions inherited from robotide.lib.robot.model.testsuite.TestSuite
def __init__ (self, name='', doc='', metadata=None, source=None, rpa=False)
 
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 keywords (self, keywords)
 Suite setup and teardown as a :class:~.Keywords object. More...
 
def metadata (self, metadata)
 Free test suite metadata as a dictionary. More...
 
def remove_empty_suites (self)
 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 robotide.lib.robot.model.modelobject.ModelObject
def __repr__ (self)
 
def __setstate__ (self, state)
 Customize attribute updating when using the copy module. More...
 
def __unicode__ (self)
 
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 robotide.lib.robot.model.testsuite.TestSuite
 doc
 
 keywords
 
 metadata
 
 parent
 
 rpa
 
 source
 
 suites
 
 tests
 

Static Public Attributes

 keyword_class = Keyword
 
 test_class = TestCase
 
- Static Public Attributes inherited from robotide.lib.robot.model.testsuite.TestSuite
 keyword_class = Keyword
 
 test_class = TestCase
 

Properties

 criticality = property
 Used by tests to determine are they considered critical or not. More...
 
 elapsedtime = property
 Total execution time in milliseconds. More...
 
 full_message = property
 Combination of :attr:message and :attr:stat_message. More...
 
 passed = property
 True if no critical test has failed, 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' if no critical test has failed, 'FAIL' otherwise. More...
 
- Properties inherited from robotide.lib.robot.model.testsuite.TestSuite
 _visitors = property
 
 id = property
 An automatically generated unique id. More...
 
 longname = property
 Suite name prefixed with the long name of the parent suite. More...
 
 name = property
 Test suite name. More...
 
 test_count = property
 Number of the tests in this suite, recursively. More...
 

Private Member Functions

def criticality (self)
 
def elapsedtime (self)
 
def full_message (self)
 
def passed (self)
 
def stat_message (self)
 
def statistics (self)
 
def status (self)
 

Private Attributes

 _criticality
 

Static Private Attributes

list __slots__ = ['message', 'starttime', 'endtime', '_criticality']
 

Detailed Description

Represents results of a single test suite.

See the base class for documentation of attributes not documented here.

Definition at line 181 of file model.py.

Constructor & Destructor Documentation

◆ __init__()

def robotide.lib.robot.result.model.TestSuite.__init__ (   self,
  name = '',
  doc = '',
  metadata = None,
  source = None,
  message = '',
  starttime = None,
  endtime = None,
  rpa = False 
)

Definition at line 186 of file model.py.

Member Function Documentation

◆ configure()

def robotide.lib.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',
                        critical_tags='smoke',
                        doc='Smoke test results.')

Reimplemented from robotide.lib.robot.model.testsuite.TestSuite.

Definition at line 316 of file model.py.

◆ criticality()

def robotide.lib.robot.result.model.TestSuite.criticality (   self)
private

Definition at line 262 of file model.py.

◆ elapsedtime()

def robotide.lib.robot.result.model.TestSuite.elapsedtime (   self)
private

Definition at line 247 of file model.py.

◆ filter_messages()

def robotide.lib.robot.result.model.TestSuite.filter_messages (   self,
  log_level = 'TRACE' 
)

Remove log messages below the specified log_level.

Definition at line 299 of file model.py.

◆ full_message()

def robotide.lib.robot.result.model.TestSuite.full_message (   self)
private

Definition at line 231 of file model.py.

◆ handle_suite_teardown_failures()

def robotide.lib.robot.result.model.TestSuite.handle_suite_teardown_failures (   self)

Internal usage only.

Definition at line 321 of file model.py.

◆ passed()

def robotide.lib.robot.result.model.TestSuite.passed (   self)
private

Definition at line 201 of file model.py.

◆ remove_keywords()

def robotide.lib.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.

Definition at line 295 of file model.py.

◆ set_criticality()

def robotide.lib.robot.result.model.TestSuite.set_criticality (   self,
  critical_tags = None,
  non_critical_tags = None 
)

Sets which tags are considered critical and which non-critical.

    :param critical_tags: Tags or patterns considered critical. See
        the documentation of the ``--critical`` option for more details.
    :param non_critical_tags: Tags or patterns considered non-critical. See
        the documentation of the ``--noncritical`` option for more details.

    Tags can be given as lists of strings or, when giving only one,
    as single strings. This information is used by tests to determine
    are they considered critical or not.

    Criticality can be set only to the root test suite.

Definition at line 282 of file model.py.

◆ stat_message()

def robotide.lib.robot.result.model.TestSuite.stat_message (   self)
private

Definition at line 240 of file model.py.

◆ statistics()

def robotide.lib.robot.result.model.TestSuite.statistics (   self)
private

Definition at line 224 of file model.py.

◆ status()

def robotide.lib.robot.result.model.TestSuite.status (   self)
private

Definition at line 208 of file model.py.

◆ suite_teardown_failed()

def robotide.lib.robot.result.model.TestSuite.suite_teardown_failed (   self,
  message 
)

Internal usage only.

Definition at line 325 of file model.py.

Member Data Documentation

◆ __slots__

list robotide.lib.robot.result.model.TestSuite.__slots__ = ['message', 'starttime', 'endtime', '_criticality']
staticprivate

Definition at line 182 of file model.py.

◆ _criticality

robotide.lib.robot.result.model.TestSuite._criticality
private

Definition at line 195 of file model.py.

◆ endtime

robotide.lib.robot.result.model.TestSuite.endtime

Definition at line 194 of file model.py.

◆ keyword_class

robotide.lib.robot.result.model.TestSuite.keyword_class = Keyword
static

Definition at line 184 of file model.py.

◆ message

robotide.lib.robot.result.model.TestSuite.message

Definition at line 190 of file model.py.

◆ starttime

robotide.lib.robot.result.model.TestSuite.starttime

Definition at line 192 of file model.py.

◆ test_class

robotide.lib.robot.result.model.TestSuite.test_class = TestCase
static

Definition at line 183 of file model.py.

Property Documentation

◆ criticality

robotide.lib.robot.result.model.TestSuite.criticality = property
static

Used by tests to determine are they considered critical or not.

    Normally configured using ``--critical`` and ``--noncritical``
    command line options. Can be set programmatically using
    :meth:`set_criticality` of the root test suite.

Definition at line 260 of file model.py.

◆ elapsedtime

robotide.lib.robot.result.model.TestSuite.elapsedtime = property
static

Total execution time in milliseconds.

Definition at line 245 of file model.py.

◆ full_message

robotide.lib.robot.result.model.TestSuite.full_message = property
static

Combination of :attr:message and :attr:stat_message.

Definition at line 229 of file model.py.

◆ passed

robotide.lib.robot.result.model.TestSuite.passed = property
static

True if no critical test has failed, False otherwise.

Definition at line 199 of file model.py.

◆ stat_message

robotide.lib.robot.result.model.TestSuite.stat_message = property
static

String representation of the :attr:statistics.

Definition at line 238 of file model.py.

◆ statistics

robotide.lib.robot.result.model.TestSuite.statistics = property
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.critical.failed)
        print(stats.all.total)
        print(stats.message)

Definition at line 222 of file model.py.

◆ status

robotide.lib.robot.result.model.TestSuite.status = property
static

'PASS' if no critical test has failed, 'FAIL' otherwise.

Definition at line 206 of file model.py.


The documentation for this class was generated from the following file: