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

Base model for single suite. More...

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

Public Member Functions

def __init__ (self, name='', doc='', metadata=None, source=None, rpa=False)
 
def configure (self, **options)
 A shortcut to configure a suite using one method call. More...
 
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

 doc
 
 keywords
 
 metadata
 
 parent
 
 rpa
 
 source
 
 suites
 
 tests
 

Static Public Attributes

 keyword_class = Keyword
 
 test_class = TestCase
 

Properties

 _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 _visitors (self)
 
def id (self)
 
def longname (self)
 
def name (self)
 
def name (self, name)
 
def test_count (self)
 

Private Attributes

 _my_visitors
 
 _name
 

Static Private Attributes

list __slots__ = ['parent', 'source', '_name', 'doc', '_my_visitors', 'rpa']
 

Detailed Description

Base model for single suite.

Extended by :class:`robot.running.model.TestSuite` and
:class:`robot.result.model.TestSuite`.

Definition at line 33 of file testsuite.py.

Constructor & Destructor Documentation

◆ __init__()

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

Reimplemented in robotide.lib.robot.running.model.TestSuite.

Definition at line 38 of file testsuite.py.

Member Function Documentation

◆ _visitors()

def robotide.lib.robot.model.testsuite.TestSuite._visitors (   self)
private

Definition at line 53 of file testsuite.py.

◆ configure()

def robotide.lib.robot.model.testsuite.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.model.configurer.SuiteConfigurer` that will then
        set suite attributes, call :meth:`filter`, etc. as needed.

Reimplemented in robotide.lib.robot.result.model.TestSuite.

Definition at line 166 of file testsuite.py.

◆ filter()

def robotide.lib.robot.model.testsuite.TestSuite.filter (   self,
  included_suites = None,
  included_tests = None,
  included_tags = None,
  excluded_tags = None 
)

Select test cases and remove others from this suite.

    Parameters have the same semantics as ``--suite``, ``--test``,
    ``--include``, and ``--exclude`` command line options. All of them
    can be given as a list of strings, or when selecting only one, as
    a single string.

    Child suites that contain no tests after filtering are automatically
    removed.

    Example::

        suite.filter(included_tests=['Test 1', '* Example'],
                     included_tags='priority-1')

Definition at line 153 of file testsuite.py.

◆ id()

def robotide.lib.robot.model.testsuite.TestSuite.id (   self)
private

Definition at line 111 of file testsuite.py.

◆ keywords()

def robotide.lib.robot.model.testsuite.TestSuite.keywords (   self,
  keywords 
)

Suite setup and teardown as a :class:~.Keywords object.

Definition at line 95 of file testsuite.py.

◆ longname()

def robotide.lib.robot.model.testsuite.TestSuite.longname (   self)
private

Definition at line 73 of file testsuite.py.

◆ metadata()

def robotide.lib.robot.model.testsuite.TestSuite.metadata (   self,
  metadata 
)

Free test suite metadata as a dictionary.

Definition at line 80 of file testsuite.py.

◆ name() [1/2]

def robotide.lib.robot.model.testsuite.TestSuite.name (   self)
private

Definition at line 61 of file testsuite.py.

◆ name() [2/2]

def robotide.lib.robot.model.testsuite.TestSuite.name (   self,
  name 
)
private

Definition at line 66 of file testsuite.py.

◆ remove_empty_suites()

def robotide.lib.robot.model.testsuite.TestSuite.remove_empty_suites (   self)

Removes all child suites not containing any tests, recursively.

Definition at line 174 of file testsuite.py.

◆ set_tags()

def robotide.lib.robot.model.testsuite.TestSuite.set_tags (   self,
  add = None,
  remove = None,
  persist = False 
)

Add and/or remove specified tags to the tests in this suite.

    :param add: Tags to add as a list or, if adding only one,
        as a single string.
    :param remove: Tags to remove as a list or as a single string.
        Can be given as patterns where ``*`` and ``?`` work as wildcards.
    :param persist: Add/remove specified tags also to new tests added
        to this suite in the future.

Definition at line 132 of file testsuite.py.

◆ suites()

def robotide.lib.robot.model.testsuite.TestSuite.suites (   self,
  suites 
)

Child suites as a :class:~.TestSuites object.

Definition at line 85 of file testsuite.py.

◆ test_count()

def robotide.lib.robot.model.testsuite.TestSuite.test_count (   self)
private

Definition at line 120 of file testsuite.py.

◆ tests()

def robotide.lib.robot.model.testsuite.TestSuite.tests (   self,
  tests 
)

Tests as a :class:~.TestCases object.

Definition at line 90 of file testsuite.py.

◆ visit()

def robotide.lib.robot.model.testsuite.TestSuite.visit (   self,
  visitor 
)

:mod:Visitor interface <robot.model.visitor> entry-point.

Definition at line 178 of file testsuite.py.

Member Data Documentation

◆ __slots__

list robotide.lib.robot.model.testsuite.TestSuite.__slots__ = ['parent', 'source', '_name', 'doc', '_my_visitors', 'rpa']
staticprivate

Definition at line 34 of file testsuite.py.

◆ _my_visitors

robotide.lib.robot.model.testsuite.TestSuite._my_visitors
private

Definition at line 48 of file testsuite.py.

◆ _name

robotide.lib.robot.model.testsuite.TestSuite._name
private

Definition at line 40 of file testsuite.py.

◆ doc

robotide.lib.robot.model.testsuite.TestSuite.doc

Definition at line 41 of file testsuite.py.

◆ keyword_class

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

Definition at line 36 of file testsuite.py.

◆ keywords

robotide.lib.robot.model.testsuite.TestSuite.keywords

Definition at line 47 of file testsuite.py.

◆ metadata

robotide.lib.robot.model.testsuite.TestSuite.metadata

Definition at line 42 of file testsuite.py.

◆ parent

robotide.lib.robot.model.testsuite.TestSuite.parent

Definition at line 39 of file testsuite.py.

◆ rpa

robotide.lib.robot.model.testsuite.TestSuite.rpa

Definition at line 44 of file testsuite.py.

◆ source

robotide.lib.robot.model.testsuite.TestSuite.source

Definition at line 43 of file testsuite.py.

◆ suites

robotide.lib.robot.model.testsuite.TestSuite.suites

Definition at line 45 of file testsuite.py.

◆ test_class

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

Definition at line 35 of file testsuite.py.

◆ tests

robotide.lib.robot.model.testsuite.TestSuite.tests

Definition at line 46 of file testsuite.py.

Property Documentation

◆ _visitors

robotide.lib.robot.model.testsuite.TestSuite._visitors = property
staticprivate

Definition at line 51 of file testsuite.py.

◆ id

robotide.lib.robot.model.testsuite.TestSuite.id = property
static

An automatically generated unique id.

    The root suite has id ``s1``, its child suites have ids ``s1-s1``,
    ``s1-s2``, ..., their child suites get ids ``s1-s1-s1``, ``s1-s1-s2``,
    ..., ``s1-s2-s1``, ..., and so on.

    The first test in a suite has an id like ``s1-t1``, the second has an
    id ``s1-t2``, and so on. Similarly keywords in suites (setup/teardown)
    and in tests get ids like ``s1-k1``, ``s1-t1-k1``, and ``s1-s4-t2-k5``.

Definition at line 109 of file testsuite.py.

◆ longname

robotide.lib.robot.model.testsuite.TestSuite.longname = property
static

Suite name prefixed with the long name of the parent suite.

Definition at line 71 of file testsuite.py.

◆ name

robotide.lib.robot.model.testsuite.TestSuite.name = property
static

Test suite name.

If not set, constructed from child suite names.

Definition at line 59 of file testsuite.py.

◆ test_count

robotide.lib.robot.model.testsuite.TestSuite.test_count = property
static

Number of the tests in this suite, recursively.

Definition at line 118 of file testsuite.py.


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