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

Represents a single executable test suite. More...

Inheritance diagram for robotide.lib.robot.running.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, rpa=False)
 
def configure (self, randomize_suites=False, randomize_tests=False, randomize_seed=None, **options)
 A shortcut to configure a suite using one method call. More...
 
def randomize (self, suites=True, tests=True, seed=None)
 Randomizes the order of suites and/or tests, recursively. More...
 
def run (self, settings=None, **options)
 Executes the suite based based the given settings or options. More...
 
- Public Member Functions inherited from robotide.lib.robot.model.testsuite.TestSuite
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

 resource
 
- 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
 

Static Private Attributes

list __slots__ = ['resource']
 

Additional Inherited Members

- 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...
 

Detailed Description

Represents a single executable test suite.

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

Definition at line 117 of file model.py.

Constructor & Destructor Documentation

◆ __init__()

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

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

Definition at line 122 of file model.py.

Member Function Documentation

◆ configure()

def robotide.lib.robot.running.model.TestSuite.configure (   self,
  randomize_suites = False,
  randomize_tests = False,
  randomize_seed = None,
**  options 
)

A shortcut to configure a suite using one method call.

    Can only be used with the root test suite.

    :param randomize_xxx: Passed to :meth:`randomize`.
    :param options: Passed to
        :class:`~robot.model.configurer.SuiteConfigurer` that will then
        set suite attributes, call :meth:`filter`, etc. as needed.

    Example::

        suite.configure(included_tags=['smoke'],
                        doc='Smoke test results.')

Definition at line 143 of file model.py.

◆ randomize()

def robotide.lib.robot.running.model.TestSuite.randomize (   self,
  suites = True,
  tests = True,
  seed = None 
)

Randomizes the order of suites and/or tests, recursively.

    :param suites: Boolean controlling should suites be randomized.
    :param tests: Boolean controlling should tests be randomized.
    :param seed: Random seed. Can be given if previous random order needs
        to be re-created. Seed value is always shown in logs and reports.

Definition at line 155 of file model.py.

◆ run()

def robotide.lib.robot.running.model.TestSuite.run (   self,
  settings = None,
**  options 
)

Executes the suite based based the given settings or options.

    :param settings: :class:`~robot.conf.settings.RobotSettings` object
        to configure test execution.
    :param options: Used to construct new
        :class:`~robot.conf.settings.RobotSettings` object if ``settings``
        are not given.
    :return: :class:`~robot.result.executionresult.Result` object with
        information about executed suites and tests.

    If ``options`` are used, their names are the same as long command line
    options except without hyphens. Some options are ignored (see below),
    but otherwise they have the same semantics as on the command line.
    Options that can be given on the command line multiple times can be
    passed as lists like ``variable=['VAR1:value1', 'VAR2:value2']``.
    If such an option is used only once, it can be given also as a single
    string like ``variable='VAR:value'``.

    Additionally listener option allows passing object directly instead of
    listener name, e.g. ``run('tests.robot', listener=Listener())``.

    To capture stdout and/or stderr streams, pass open file objects in as
    special keyword arguments ``stdout`` and ``stderr``, respectively.

    Only options related to the actual test execution have an effect.
    For example, options related to selecting or modifying test cases or
    suites (e.g. ``--include``, ``--name``, ``--prerunmodifier``) or
    creating logs and reports are silently ignored. The output XML
    generated as part of the execution can be configured, though. This
    includes disabling it with ``output=None``.

    Example::

        stdout = StringIO()
        result = suite.run(variable='EXAMPLE:value',
                           critical='regression',
                           output='example.xml',
                           exitonfailure=True,
                           stdout=stdout)
        print result.return_code

    To save memory, the returned
    :class:`~robot.result.executionresult.Result` object does not
    have any information about the executed keywords. If that information
    is needed, the created output XML file needs to be read  using the
    :class:`~robot.result.resultbuilder.ExecutionResult` factory method.

    See the :mod:`package level <robot.running>` documentation for
    more examples, including how to construct executable test suites and
    how to create logs and reports based on the execution results.

    See the :func:`robot.run <robot.run.run>` function for a higher-level
    API for executing tests in files or directories.

Definition at line 212 of file model.py.

Member Data Documentation

◆ __slots__

list robotide.lib.robot.running.model.TestSuite.__slots__ = ['resource']
staticprivate

Definition at line 118 of file model.py.

◆ keyword_class

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

Definition at line 120 of file model.py.

◆ resource

robotide.lib.robot.running.model.TestSuite.resource

Definition at line 127 of file model.py.

◆ test_class

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

Definition at line 119 of file model.py.


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