FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add fullName to Behave by sseliverstov · Pull Request #524 · allure-framework/allure-python · GitHub

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (2) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
2 changes: 2 additions & 0 deletions allure-behave/src/listener.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
from allure_behave.utils import get_status, get_status_details
from allure_behave.utils import scenario_links
from allure_behave.utils import scenario_labels
from allure_behave.utils import get_fullname


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

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)
Expand Down
6 changes: 6 additions & 0 deletions allure-behave/src/utils.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,12 @@ def get_status(exception):
return Status.PASSED


def get_fullname(scenario):
name_with_param = scenario_name(scenario)
name = name_with_param.rsplit(" -- ")[0]
return "{filename}:{name}".format(filename=scenario.filename, name=name)


def step_status_details(result):
if result.exception:
# workaround for https://github.com/behave/behave/pull/616
Expand Down

Back | FazBrowse Home | New Git URL