18 from .configurer
import SuiteConfigurer
19 from .filter
import Filter, EmptySuiteRemover
20 from .itemlist
import ItemList
21 from .keyword
import Keyword, Keywords
22 from .metadata
import Metadata
23 from .modelobject
import ModelObject
24 from .tagsetter
import TagSetter
25 from .testcase
import TestCase, TestCases
34 __slots__ = [
'parent',
'source',
'_name',
'doc',
'_my_visitors',
'rpa']
36 keyword_class = Keyword
38 def __init__(self, name='', doc='', metadata=None, source=None, rpa=False):
54 parent_visitors = self.
parentparent._visitors
if self.
parentparent
else []
67 self.
_name_name = name
86 return TestSuites(self.__class__, self, suites)
114 return '%s-s%d' % (self.
parentparent.id, self.
parentparent.suites.index(self)+1)
118 test_count = property
132 def set_tags(self, add=None, remove=None, persist=False):
134 self.
visitvisit(setter)
153 def filter(self, included_suites=None, included_tests=None,
154 included_tags=None, excluded_tags=None):
155 self.
visitvisit(
Filter(included_suites, included_tests,
156 included_tags, excluded_tags))
167 if self.
parentparent
is not None:
168 raise ValueError(
"'TestSuite.configure()' can only be used with "
169 "the root test suite.")
179 visitor.visit_suite(self)
185 def __init__(self, suite_class=TestSuite, parent=None, suites=None):
186 ItemList.__init__(self, suite_class, {
'parent': parent}, suites)
A list-like object representing keywords in a suite, a test or a keyword.
Base model for single suite.
test_count
Number of the tests in this suite, recursively.
def configure(self, **options)
A shortcut to configure a suite using one method call.
def metadata(self, metadata)
Free test suite metadata as a dictionary.
def remove_empty_suites(self)
Removes all child suites not containing any tests, recursively.
def visit(self, visitor)
:mod:Visitor interface <robot.model.visitor> entry-point.
def suites(self, suites)
Child suites as a :class:~.TestSuites object.
def filter(self, included_suites=None, included_tests=None, included_tags=None, excluded_tags=None)
Select test cases and remove others from this suite.
longname
Suite name prefixed with the long name of the parent suite.
def keywords(self, keywords)
Suite setup and teardown as a :class:~.Keywords object.
id
An automatically generated unique id.
def __init__(self, name='', doc='', metadata=None, source=None, rpa=False)
def set_tags(self, add=None, remove=None, persist=False)
Add and/or remove specified tags to the tests in this suite.
def tests(self, tests)
Tests as a :class:~.TestCases object.
def __init__(self, suite_class=TestSuite, parent=None, suites=None)