示例#1
0
 def start_suite(self, suite):
     variables = GLOBAL_VARIABLES.copy()
     variables.set_from_variable_table(suite.variables)
     result = TestSuite(source=suite.source,
                        name=suite.name,
                        doc=suite.doc,
                        metadata=suite.metadata,
                        starttime=get_timestamp())
     if not self.result:
         result.set_criticality(self._settings.critical_tags,
                                self._settings.non_critical_tags)
         self.result = Result(root_suite=result)
         self.result.configure(status_rc=self._settings.status_rc,
                               stat_config=self._settings.statistics_config)
     else:
         self._suite.suites.append(result)
     ns = Namespace(result, variables, self._variables, suite.user_keywords,
                    suite.imports)
     EXECUTION_CONTEXTS.start_suite(ns, self._output,
                                    self._settings.dry_run)
     self._context.set_suite_variables(result)
     if not (self._suite_status and self._suite_status.failures):
         ns.handle_imports()
     variables.resolve_delayed()
     result.doc = self._resolve_setting(result.doc)
     result.metadata = [(self._resolve_setting(n), self._resolve_setting(v))
                        for n, v in result.metadata.items()]
     self._context.set_suite_variables(result)
     self._suite = result
     self._suite_status = SuiteStatus(self._suite_status,
                                      self._settings.exit_on_failure,
                                      self._settings.skip_teardown_on_exit)
     self._output.start_suite(ModelCombiner(suite, self._suite))
     self._run_setup(suite.keywords.setup, self._suite_status)
     self._executed_tests = NormalizedDict(ignore='_')
示例#2
0
 def start_suite(self, suite):
     variables = GLOBAL_VARIABLES.copy()
     variables.set_from_variable_table(suite.variables)
     result = TestSuite(source=suite.source,
                        name=suite.name,
                        doc=suite.doc,
                        metadata=suite.metadata,
                        starttime=get_timestamp())
     if not self.result:
         result.set_criticality(self._settings.critical_tags,
                                self._settings.non_critical_tags)
         self.result = Result(root_suite=result)
         self.result.configure(status_rc=self._settings.status_rc,
                               stat_config=self._settings.statistics_config)
     else:
         self._suite.suites.append(result)
     ns = Namespace(result, variables, self._variables,
                    suite.user_keywords, suite.imports)
     EXECUTION_CONTEXTS.start_suite(ns, self._output, self._settings.dry_run)
     self._context.set_suite_variables(result)
     if not (self._suite_status and self._suite_status.failures):
         ns.handle_imports()
     variables.resolve_delayed()
     result.doc = self._resolve_setting(result.doc)
     result.metadata = [(self._resolve_setting(n), self._resolve_setting(v))
                        for n, v in result.metadata.items()]
     self._context.set_suite_variables(result)
     self._suite = result
     self._suite_status = SuiteStatus(self._suite_status,
                                      self._settings.exit_on_failure,
                                      self._settings.skip_teardown_on_exit)
     self._output.start_suite(ModelCombiner(suite, self._suite))
     self._run_setup(suite.keywords.setup, self._suite_status)
     self._executed_tests = NormalizedDict(ignore='_')
示例#3
0
 def start_suite(self, suite):
     if suite.name in self._executed[-1] and suite.parent.source:
         self._output.warn(
             f"Multiple suites with name '{suite.name}' executed in "
             f"suite '{suite.parent.longname}'.")
     self._executed[-1][suite.name] = True
     self._executed.append(NormalizedDict(ignore='_'))
     self._output.library_listeners.new_suite_scope()
     result = TestSuite(source=suite.source,
                        name=suite.name,
                        doc=suite.doc,
                        metadata=suite.metadata,
                        starttime=get_timestamp(),
                        rpa=self._settings.rpa)
     if not self.result:
         self.result = Result(root_suite=result, rpa=self._settings.rpa)
         self.result.configure(status_rc=self._settings.status_rc,
                               stat_config=self._settings.statistics_config)
     else:
         self._suite.suites.append(result)
     self._suite = result
     self._suite_status = SuiteStatus(self._suite_status,
                                      self._settings.exit_on_failure,
                                      self._settings.exit_on_error,
                                      self._settings.skip_teardown_on_exit)
     ns = Namespace(self._variables, result, suite.resource,
                    self._settings.languages)
     ns.start_suite()
     ns.variables.set_from_variable_table(suite.resource.variables)
     EXECUTION_CONTEXTS.start_suite(result, ns, self._output,
                                    self._settings.dry_run)
     self._context.set_suite_variables(result)
     if not self._suite_status.failed:
         ns.handle_imports()
         ns.variables.resolve_delayed()
     result.doc = self._resolve_setting(result.doc)
     result.metadata = [(self._resolve_setting(n), self._resolve_setting(v))
                        for n, v in result.metadata.items()]
     self._context.set_suite_variables(result)
     self._output.start_suite(
         ModelCombiner(suite,
                       result,
                       tests=suite.tests,
                       suites=suite.suites,
                       test_count=suite.test_count))
     self._output.register_error_listener(self._suite_status.error_occurred)
     self._run_setup(suite.setup, self._suite_status)
示例#4
0
    def start_suite(self, suite):
        with open('Excute.txt', 'w') as f:
            f.write('TS=')
            f.write(str(suite.name))
            f.write('\n')

        self._output.library_listeners.new_suite_scope()
        result = TestSuite(source=suite.source,
                           name=suite.name,
                           doc=suite.doc,
                           metadata=suite.metadata,
                           starttime=get_timestamp())
        if not self.result:
            result.set_criticality(self._settings.critical_tags,
                                   self._settings.non_critical_tags)
            self.result = Result(root_suite=result)
            self.result.configure(status_rc=self._settings.status_rc,
                                  stat_config=self._settings.statistics_config)
        else:
            self._suite.suites.append(result)
        self._suite = result
        self._suite_status = SuiteStatus(self._suite_status,
                                         self._settings.exit_on_failure,
                                         self._settings.exit_on_error,
                                         self._settings.skip_teardown_on_exit)
        ns = Namespace(self._variables, result, suite.resource)
        ns.start_suite()
        ns.variables.set_from_variable_table(suite.resource.variables)
        EXECUTION_CONTEXTS.start_suite(result, ns, self._output,
                                       self._settings.dry_run)
        self._context.set_suite_variables(result)
        if not self._suite_status.failures:
            ns.handle_imports()
            ns.variables.resolve_delayed()
        result.doc = self._resolve_setting(result.doc)
        result.metadata = [(self._resolve_setting(n), self._resolve_setting(v))
                           for n, v in result.metadata.items()]
        self._context.set_suite_variables(result)
        self._output.start_suite(ModelCombiner(suite, result,
                                               tests=suite.tests,
                                               suites=suite.suites,
                                               test_count=suite.test_count))
        self._output.register_error_listener(self._suite_status.error_occurred)
        self._run_setup(suite.keywords.setup, self._suite_status)
        self._executed_tests = NormalizedDict(ignore='_')
示例#5
0
 def start_suite(self, suite):
     self._output.library_listeners.new_suite_scope()
     result = TestSuite(source=suite.source,
                        name=suite.name,
                        doc=suite.doc,
                        metadata=suite.metadata,
                        starttime=get_timestamp(),
                        rpa=self._settings.rpa)
     if not self.result:
         result.set_criticality(self._settings.critical_tags,
                                self._settings.non_critical_tags)
         self.result = Result(root_suite=result, rpa=self._settings.rpa)
         self.result.configure(status_rc=self._settings.status_rc,
                               stat_config=self._settings.statistics_config)
     else:
         self._suite.suites.append(result)
     self._suite = result
     self._suite_status = SuiteStatus(self._suite_status,
                                      self._settings.exit_on_failure,
                                      self._settings.exit_on_error,
                                      self._settings.skip_teardown_on_exit)
     ns = Namespace(self._variables, result, suite.resource)
     ns.start_suite()
     ns.variables.set_from_variable_table(suite.resource.variables)
     EXECUTION_CONTEXTS.start_suite(result, ns, self._output,
                                    self._settings.dry_run)
     self._context.set_suite_variables(result)
     if not self._suite_status.failures:
         ns.handle_imports()
         ns.variables.resolve_delayed()
     result.doc = self._resolve_setting(result.doc)
     result.metadata = [(self._resolve_setting(n), self._resolve_setting(v))
                        for n, v in result.metadata.items()]
     self._context.set_suite_variables(result)
     self._output.start_suite(
         ModelCombiner(suite,
                       result,
                       tests=suite.tests,
                       suites=suite.suites,
                       test_count=suite.test_count))
     self._output.register_error_listener(self._suite_status.error_occurred)
     self._run_setup(suite.keywords.setup, self._suite_status)
     self._executed_tests = NormalizedDict(ignore='_')