Thanks to visit codestin.com
Credit goes to github.com

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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion allure-robotframework/src/listener/allure_listener.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@ def start_test(self, name, attributes):
test_result.name = name
test_result.fullName = long_name
test_result.titlePath = attributes.get("titlepath", [])
test_result.historyId = md5(long_name)
test_result.testCaseId = md5(long_name)
test_result.historyId = test_result.testCaseId
test_result.start = now()

for container in self.lifecycle.containers():
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
from hamcrest import assert_that
from hamcrest import all_of
from hamcrest import contains_string
from tests.allure_robotframework.robot_runner import AllureRobotRunner
from allure_commons_test.report import has_test_case
from allure_commons_test.result import has_full_name
from allure_commons_test.result import has_test_case_id
from allure_commons_test.result import has_history_id


def test_identifiers_are_set(docstring, robot_runner: AllureRobotRunner):
"""
*** Test Cases ***
Foo
No Operation
"""

robot_runner.run_robotframework(
suite_literals={"Bar.robot": docstring}
)

assert_that(
robot_runner.allure_results,
has_test_case(
"Foo",
has_full_name(
all_of(
contains_string("Foo"),
contains_string("Bar"),
),
),
has_test_case_id(),
has_history_id(),
)
)