コード例 #1
0
 def stop_scenario(self, scenario):
     status = scenario_status(scenario)
     status_details = scenario_status_details(scenario)
     self.logger.update_test(self.current_scenario_uuid, stop=now(), status=status, statusDetails=status_details)
     self.logger.close_test(self.current_scenario_uuid)
     self.current_scenario_uuid = None
     self.current_step_uuid = None
コード例 #2
0
    def stop_scenario(self, scenario):
        should_run = (scenario.should_run_with_tags(self.behave_config.tags)
                      and scenario.should_run_with_name_select(
                          self.behave_config))
        should_drop_skipped_by_option = scenario.status == 'skipped' and not self.behave_config.show_skipped
        should_drop_excluded = self.hide_excluded and (
            scenario.skip_reason == TEST_PLAN_SKIP_REASON or not should_run)

        if should_drop_skipped_by_option or should_drop_excluded:
            self.logger.drop_test(self.current_scenario_uuid)
        else:
            status = scenario_status(scenario)
            status_details = scenario_status_details(scenario)

            self.flush_steps()
            test_result = self.logger.get_test(self.current_scenario_uuid)
            test_result.stop = now()
            test_result.status = status
            test_result.statusDetails = status_details
            self.logger.close_test(self.current_scenario_uuid)
            self.current_step_uuid = None
            self.group_context.append_test(self.current_scenario_uuid)
            self.group_context.exit()

        self.current_scenario_uuid = None
コード例 #3
0
    def stop_test(self, parent_uuid, uuid, name, context, exc_type, exc_val, exc_tb):
        scenario = context['scenario']
        self.flush_steps()
        status = scenario_status(scenario)
        status_details = scenario_status_details(scenario)
        self.logger.update_test(uuid, stop=now(), status=status, statusDetails=status_details)
        self.logger.close_test(uuid)
        self.current_step_uuid = None

        for group in self.fixture_context.exit():
            group.children.append(uuid)
            self.logger.stop_group(group.uuid)

        self.execution_context.exit()
        self.execution_context.append(uuid)
コード例 #4
0
ファイル: listener.py プロジェクト: mrityunia/Shadowfax_Test
    def stop_scenario(self, scenario):
        if scenario.status == 'skipped' and not self.behave_config.show_skipped:
            self.logger.drop_test(self.current_scenario_uuid)
        else:
            status = scenario_status(scenario)
            status_details = scenario_status_details(scenario)

            self.flush_steps()
            test_result = self.logger.get_test(self.current_scenario_uuid)
            test_result.stop = now()
            test_result.status = status
            test_result.statusDetails = status_details
            self.logger.close_test(self.current_scenario_uuid)
            self.current_step_uuid = None

            for group in self.fixture_context.exit():
                group.children.append(self.current_scenario_uuid)
                self.logger.stop_group(group.uuid)

        self.execution_context.exit()
        self.execution_context.append(self.current_scenario_uuid)
        self.current_scenario_uuid = None
コード例 #5
0
    def stop_scenario(self, scenario):
        if scenario.status == 'skipped' and not self.behave_config.show_skipped:
            self.logger.drop_test(self.current_scenario_uuid)
        else:
            status = scenario_status(scenario)
            status_details = scenario_status_details(scenario)

            self.flush_steps()
            test_result = self.logger.get_test(self.current_scenario_uuid)
            test_result.stop = now()
            test_result.status = status
            test_result.statusDetails = status_details
            self.logger.close_test(self.current_scenario_uuid)
            self.current_step_uuid = None

            for group in self.fixture_context.exit():
                group.children.append(self.current_scenario_uuid)
                self.logger.stop_group(group.uuid)

        self.execution_context.exit()
        self.execution_context.append(self.current_scenario_uuid)
        self.current_scenario_uuid = None