Skip to content

Commit b666b06

Browse files
authored
add fullName (via #524)
1 parent 34a91fa commit b666b06

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

allure-behave/src/listener.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
from allure_behave.utils import get_status, get_status_details
2222
from allure_behave.utils import scenario_links
2323
from allure_behave.utils import scenario_labels
24+
from allure_behave.utils import get_fullname
2425

2526

2627
BEFORE_FIXTURES = ['before_all', 'before_tag', 'before_feature', 'before_scenario']
@@ -93,6 +94,7 @@ def start_scenario(self, scenario):
9394

9495
test_case = TestResult(uuid=self.current_scenario_uuid, start=now())
9596
test_case.name = scenario_name(scenario)
97+
test_case.fullName = get_fullname(scenario)
9698
test_case.historyId = scenario_history_id(scenario)
9799
test_case.description = '\n'.join(scenario.description)
98100
test_case.parameters = scenario_parameters(scenario)

allure-behave/src/utils.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,12 @@ def get_status(exception):
9191
return Status.PASSED
9292

9393

94+
def get_fullname(scenario):
95+
name_with_param = scenario_name(scenario)
96+
name = name_with_param.rsplit(" -- ")[0]
97+
return "{filename}:{name}".format(filename=scenario.filename, name=name)
98+
99+
94100
def step_status_details(result):
95101
if result.exception:
96102
# workaround for https://github.com/behave/behave/pull/616

0 commit comments

Comments
 (0)