1515from allure_commons .model2 import StatusDetails
1616from functools import partial
1717from allure_commons .lifecycle import AllureLifecycle
18- from .utils import get_full_name
18+ from .utils import get_full_name , get_name , get_params
1919
2020
2121class PytestBDDListener (object ):
@@ -36,14 +36,17 @@ def _scenario_finalizer(self, scenario):
3636 def pytest_bdd_before_scenario (self , request , feature , scenario ):
3737 uuid = get_uuid (request .node .nodeid )
3838 full_name = get_full_name (feature , scenario )
39+ name = get_name (request .node , scenario )
3940 with self .lifecycle .schedule_test_case (uuid = uuid ) as test_result :
4041 test_result .fullName = full_name
42+ test_result .name = name
4143 test_result .start = now ()
4244 test_result .labels .append (Label (name = LabelType .HOST , value = self .host ))
4345 test_result .labels .append (Label (name = LabelType .THREAD , value = self .thread ))
4446 test_result .labels .append (Label (name = LabelType .FRAMEWORK , value = "pytest-bdd" ))
4547 test_result .labels .append (Label (name = LabelType .LANGUAGE , value = platform_label ()))
4648 test_result .labels .append (Label (name = LabelType .FEATURE , value = feature .name ))
49+ test_result .parameters = get_params (request .node )
4750
4851 finalizer = partial (self ._scenario_finalizer , scenario )
4952 request .node .addfinalizer (finalizer )
@@ -59,7 +62,7 @@ def pytest_bdd_before_step_call(self, request, feature, scenario, step, step_fun
5962 parent_uuid = get_uuid (request .node .nodeid )
6063 uuid = get_uuid (str (id (step )))
6164 with self .lifecycle .start_step (parent_uuid = parent_uuid , uuid = uuid ) as step_result :
62- step_result .name = get_step_name (step )
65+ step_result .name = get_step_name (request . node , step )
6366
6467 @pytest .hookimpl
6568 def pytest_bdd_after_step (self , request , feature , scenario , step , step_func , step_func_args ):
0 commit comments