Esempio n. 1
0
 def __init__(self,
              data,
              parent=None,
              defaults=None,
              process_variables=True):
     BaseTestSuite.__init__(self, data.name, data.source, parent)
     self.variables = GLOBAL_VARIABLES.copy()
     if process_variables:
         self.variables.set_from_variable_table(data.variable_table)
     self.source = data.source
     self.doc = data.setting_table.doc.value
     self.metadata = self._get_metadata(data.setting_table.metadata)
     self.imports = data.imports
     self.user_keywords = UserLibrary(data.keywords)
     self.setup = Setup(data.setting_table.suite_setup.name,
                        data.setting_table.suite_setup.args)
     self.teardown = Teardown(data.setting_table.suite_teardown.name,
                              data.setting_table.suite_teardown.args)
     defaults = DefaultValues(data.setting_table, defaults)
     for suite in data.children:
         RunnableTestSuite(suite, self, defaults, process_variables)
     for test in data.testcase_table:
         RunnableTestCase(test, self, defaults)
     self._exit_on_failure_mode = False
     self._skip_teardowns_on_exit_mode = False
     self._dry_run_mode = False
Esempio n. 2
0
File: model.py Progetto: nbbull/RIDE
 def __init__(self, suitedatas):
     BaseTestSuite.__init__(self, name="")
     self.variables = GLOBAL_VARIABLES.copy()
     self.doc = ""
     self.imports = []
     self.setup = Setup(None, None)
     self.teardown = Teardown(None, None)
     for suite in suitedatas:
         RunnableTestSuite(suite, parent=self)
     self._run_mode_exit_on_failure = False
     self._run_mode_dry_run = False
     self._run_mode_skip_teardowns_on_exit = False
Esempio n. 3
0
 def __init__(self, suitedatas, process_variables=True):
     BaseTestSuite.__init__(self, name='')
     self.variables = GLOBAL_VARIABLES.copy()
     self.doc = ''
     self.imports = []
     self.setup = Setup(None, None)
     self.teardown = Teardown(None, None)
     for suite in suitedatas:
         RunnableTestSuite(suite, self, process_variables=process_variables)
     self._exit_on_failure_mode = False
     self._skip_teardowns_on_exit_mode = False
     self._dry_run_mode = False
Esempio n. 4
0
 def __init__(self, suitedatas):
     BaseTestSuite.__init__(self, name='')
     self.variables = GLOBAL_VARIABLES.copy()
     self.doc = ''
     self.imports = []
     self.setup = Setup(None, None)
     self.teardown = Teardown(None, None)
     for suite in suitedatas:
         RunnableTestSuite(suite, parent=self)
     self._exit_on_failure_mode = False
     self._skip_teardowns_on_exit_mode = False
     self._dry_run_mode = False
 def __init__(self, node, parent=None, log_level=None, settings=None):
     node = self._get_possibly_split_node(node)
     BaseTestSuite.__init__(self, node.get('name'),
                            node.get('source', None), parent)
     _SuiteReader.__init__(self, node, log_level=log_level)
     self._set_times_from_settings(settings)
     for snode in node.findall('suite'):
         self._set_attrs_from_parent(snode, node)
         TestSuite(snode, parent=self, log_level=log_level)
     for tnode in node.findall('test'):
         TestCase(tnode, parent=self, log_level=log_level)
     self.set_status()
     if node.get('generator') == 'robot' and \
             self.teardown and self.teardown.status == 'FAIL':
         self.suite_teardown_failed()
Esempio n. 6
0
File: model.py Progetto: nbbull/RIDE
 def __init__(self, data, parent=None, defaults=None):
     BaseTestSuite.__init__(self, data.name, data.source, parent)
     self.variables = GLOBAL_VARIABLES.copy()
     self.variables.set_from_variable_table(data.variable_table)
     self.source = data.source
     self.doc = data.setting_table.doc.value
     self.metadata = self._get_metadata(data.setting_table.metadata)
     self.imports = data.imports
     self.user_keywords = UserLibrary(data.keywords)
     self.setup = Setup(data.setting_table.suite_setup.name, data.setting_table.suite_setup.args)
     self.teardown = Teardown(data.setting_table.suite_teardown.name, data.setting_table.suite_teardown.args)
     defaults = DefaultValues(data.setting_table, defaults)
     for suite in data.children:
         RunnableTestSuite(suite, parent=self, defaults=defaults)
     for test in data.testcase_table:
         RunnableTestCase(test, parent=self, defaults=defaults)
     self._run_mode_exit_on_failure = False
     self._run_mode_dry_run = False
     self._run_mode_skip_teardowns_on_exit = False
Esempio n. 7
0
 def __init__(self,
              node,
              read_level=-1,
              level=1,
              parent=None,
              log_level=None):
     node = self._get_node(node, read_level, level)
     BaseTestSuite.__init__(self, node.attrs.get('name'),
                            node.attrs.get('source', None), parent)
     _SuiteReader.__init__(self, node, log_level=log_level)
     for snode in node.get_nodes('suite'):
         snode.generator = node.generator
         TestSuite(snode,
                   read_level,
                   level + 1,
                   parent=self,
                   log_level=log_level)
     for tnode in node.get_nodes('test'):
         TestCase(tnode, parent=self, log_level=log_level)
     self.set_status()
     if node.generator == 'robot' and \
             self.teardown is not None and self.teardown.status == 'FAIL':
         self.suite_teardown_failed()
Esempio n. 8
0
 def __init__(self, starttime, endtime):
     BaseTestSuite.__init__(self, name='')
     self.starttime = self._get_time(starttime)
     self.endtime = self._get_time(endtime)
     self.elapsedtime = utils.get_elapsed_time(self.starttime, self.endtime)
 def __init__(self, settings):
     BaseTestSuite.__init__(self, name='')
     self.starttime = self.endtime = None
     self._set_times_from_settings(settings)