Exemple #1
0
    def start_scenario(self, scenario):
        self.current_scenario_uuid = uuid4()
        self.fixture_context.enter()
        self.execution_context.enter()
        self.execution_context.append(self.current_scenario_uuid)

        test_case = TestResult(uuid=self.current_scenario_uuid, start=now())
        test_case.name = scenario_name(scenario)
        test_case.historyId = scenario_history_id(scenario)
        test_case.description = '\n'.join(scenario.description)
        test_case.parameters = scenario_parameters(scenario)

        issue_pattern = self.behave_config.userdata.get(
            'AllureFormatter.issue_pattern', None)
        link_pattern = self.behave_config.userdata.get(
            'AllureFormatter.link_pattern', None)
        test_case.links.extend(
            scenario_links(scenario,
                           issue_pattern=issue_pattern,
                           link_pattern=link_pattern))
        test_case.labels.extend(scenario_labels(scenario))
        test_case.labels.append(
            Label(name=LabelType.FEATURE, value=scenario.feature.name))
        test_case.labels.append(Label(name=LabelType.FRAMEWORK,
                                      value='behave'))
        test_case.labels.append(
            Label(name=LabelType.LANGUAGE, value=platform_label()))

        self.logger.schedule_test(self.current_scenario_uuid, test_case)
Exemple #2
0
    def start_scenario(self, scenario):
        self.current_scenario_uuid = uuid4()
        test_case = TestResult(uuid=self.current_scenario_uuid, start=now())

        test_case.name = scenario_name(scenario)
        test_case.historyId = scenario_history_id(scenario)
        test_case.description = '\n'.join(scenario.description)

        labels = []
        feature_label = Label(name=LabelType.FEATURE.value,
                              value=scenario.feature.name)
        severity = (Label(name=LabelType.SEVERITY.value,
                          value=scenario_severity(scenario).value))
        labels.append(feature_label)
        labels.append(severity)
        labels += [
            Label(name=LabelType.TAG.value, value=tag)
            for tag in scenario_tags(scenario)
        ]

        test_case.parameters = scenario_parameters(scenario)
        test_case.labels = labels

        self.logger.schedule_test(self.current_scenario_uuid, test_case)
        self.update_group()
Exemple #3
0
    def start_test(self, parent_uuid, uuid, name, parameters, context):
        scenario = context['scenario']
        self.fixture_context.enter()
        self.execution_context.enter()
        self.execution_context.append(uuid)

        test_case = TestResult(uuid=uuid, start=now())
        test_case.name = scenario_name(scenario)
        test_case.historyId = scenario_history_id(scenario)
        test_case.description = '\n'.join(scenario.description)
        test_case.parameters = scenario_parameters(scenario)
        test_case.labels.extend([
            Label(name=LabelType.TAG, value=tag)
            for tag in scenario_tags(scenario)
        ])
        test_case.labels.append(
            Label(name=LabelType.SEVERITY,
                  value=scenario_severity(scenario).value))
        test_case.labels.append(
            Label(name=LabelType.FEATURE, value=scenario.feature.name))
        test_case.labels.append(Label(name=LabelType.FRAMEWORK,
                                      value='behave'))
        test_case.labels.append(
            Label(name=LabelType.LANGUAGE, value=platform_label()))

        self.logger.schedule_test(uuid, test_case)
Exemple #4
0
    def before_scenario(self, _, scenario):
        uuid = scenario_history_id(scenario)

        test_case = TestResult(uuid=uuid, start=now())
        test_case.name = scenario_name(scenario)
        test_case.historyId = scenario_history_id(scenario)

        self.allure_lifecycle.schedule_test(uuid, test_case)
    def start_scenario(self, scenario):
        self.current_scenario_uuid = uuid4()
        self.fixture_context.enter()
        self.execution_context.enter()
        self.execution_context.append(self.current_scenario_uuid)

        test_case = TestResult(uuid=self.current_scenario_uuid, start=now())
        test_case.name = scenario_name(scenario)
        test_case.historyId = scenario_history_id(scenario)
        test_case.description = '\n'.join(scenario.description)
        test_case.parameters = scenario_parameters(scenario)
        test_case.labels.extend([Label(name=LabelType.TAG, value=tag) for tag in scenario_tags(scenario)])
        test_case.labels.append(Label(name=LabelType.SEVERITY, value=scenario_severity(scenario).value))
        test_case.labels.append(Label(name=LabelType.FEATURE, value=scenario.feature.name))
        test_case.labels.append(Label(name=LabelType.FRAMEWORK, value='behave'))
        test_case.labels.append(Label(name=LabelType.LANGUAGE, value=platform_label()))

        self.logger.schedule_test(self.current_scenario_uuid, test_case)
    def start_test(self, parent_uuid, uuid, name, parameters, context):
        scenario = context['scenario']
        self.fixture_context.enter()
        self.execution_context.enter()
        self.execution_context.append(uuid)

        test_case = TestResult(uuid=uuid, start=now())

        test_case.name = scenario_name(scenario)
        test_case.historyId = scenario_history_id(scenario)
        test_case.description = '\n'.join(scenario.description)

        labels = []
        feature_label = Label(name=LabelType.FEATURE.value, value=scenario.feature.name)
        severity = (Label(name=LabelType.SEVERITY.value, value=scenario_severity(scenario).value))
        labels.append(feature_label)
        labels.append(severity)
        labels += [Label(name=LabelType.TAG.value, value=tag) for tag in scenario_tags(scenario)]

        test_case.parameters = scenario_parameters(scenario)
        test_case.labels = labels

        self.logger.schedule_test(uuid, test_case)
Exemple #7
0
    def start_scenario(self, scenario):
        self.current_scenario_uuid = uuid4()
        self.group_context.enter()

        test_case = TestResult(uuid=self.current_scenario_uuid, start=now())
        test_case.name = scenario_name(scenario)
        test_case.fullName = get_fullname(scenario)
        test_case.historyId = scenario_history_id(scenario)
        test_case.description = '\n'.join(scenario.description)
        test_case.parameters = scenario_parameters(scenario)

        test_case.links.extend(
            scenario_links(scenario,
                           issue_pattern=self.issue_pattern,
                           link_pattern=self.link_pattern))
        test_case.labels.extend(scenario_labels(scenario))
        test_case.labels.append(
            Label(name=LabelType.FEATURE, value=scenario.feature.name))
        test_case.labels.append(Label(name=LabelType.FRAMEWORK,
                                      value='behave'))
        test_case.labels.append(
            Label(name=LabelType.LANGUAGE, value=platform_label()))

        self.logger.schedule_test(self.current_scenario_uuid, test_case)