Base model for single suite. More...
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'] |
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.
| 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.
|
private |
Definition at line 53 of file testsuite.py.
| 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.
| 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.
|
private |
Definition at line 111 of file testsuite.py.
| 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.
|
private |
Definition at line 73 of file testsuite.py.
| 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.
|
private |
Definition at line 61 of file testsuite.py.
|
private |
Definition at line 66 of file testsuite.py.
| 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.
| 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.
| 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.
|
private |
Definition at line 120 of file testsuite.py.
| def robotide.lib.robot.model.testsuite.TestSuite.tests | ( | self, | |
| tests | |||
| ) |
Tests as a :class:~.TestCases object.
Definition at line 90 of file testsuite.py.
| 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.
|
staticprivate |
Definition at line 34 of file testsuite.py.
|
private |
Definition at line 48 of file testsuite.py.
|
private |
Definition at line 40 of file testsuite.py.
| robotide.lib.robot.model.testsuite.TestSuite.doc |
Definition at line 41 of file testsuite.py.
|
static |
Definition at line 36 of file testsuite.py.
| robotide.lib.robot.model.testsuite.TestSuite.keywords |
Definition at line 47 of file testsuite.py.
| robotide.lib.robot.model.testsuite.TestSuite.metadata |
Definition at line 42 of file testsuite.py.
| robotide.lib.robot.model.testsuite.TestSuite.parent |
Definition at line 39 of file testsuite.py.
| robotide.lib.robot.model.testsuite.TestSuite.rpa |
Definition at line 44 of file testsuite.py.
| robotide.lib.robot.model.testsuite.TestSuite.source |
Definition at line 43 of file testsuite.py.
| robotide.lib.robot.model.testsuite.TestSuite.suites |
Definition at line 45 of file testsuite.py.
|
static |
Definition at line 35 of file testsuite.py.
| robotide.lib.robot.model.testsuite.TestSuite.tests |
Definition at line 46 of file testsuite.py.
|
staticprivate |
Definition at line 51 of file testsuite.py.
|
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.
|
static |
Suite name prefixed with the long name of the parent suite.
Definition at line 71 of file testsuite.py.
|
static |
Test suite name.
If not set, constructed from child suite names.
Definition at line 59 of file testsuite.py.
|
static |
Number of the tests in this suite, recursively.
Definition at line 118 of file testsuite.py.