def test_dynamic_feature(executed_docstring_path): assert_that(executed_docstring_path.allure_report, has_test_case("test_dynamic_feature", has_feature("first feature"), has_feature("second feature") ) )
def test_multiple_bdd_label(executed_docstring_path): assert_that( executed_docstring_path.allure_report, has_test_case("test_multiple_bdd_label", has_epic("My epic"), has_epic("Another epic"), has_feature("My feature"), has_feature("Another feature"), has_feature("One more feature"), has_story("My story"), has_story("Alternative story")))
def test_parametrized_dynamic_feature(executed_docstring_path, feature): assert_that( executed_docstring_path.allure_report, has_test_case( "test_parametrized_dynamic_feature[{feature}]".format( feature=feature), has_feature(feature), ))
def test_func_label(): """ >>> import allure >>> @allure.epic("Label", "Bdd") ... @allure.feature("Function label") ... def test_func_label_example(): ... pass """ allure_report = run_docstring_example() assert_that( allure_report, has_test_case("test_func_label_example", has_epic("Label"), has_epic("Bdd"), has_feature("Function label")))
def test_method_label(self): """ >>> import unittest >>> import allure >>> class TestBDDLabelExample(unittest.TestCase): ... @allure.epic("Label", "Bdd") ... @allure.feature("Method label") ... def test_method_label_example(self): ... pass """ allure_report = run_docstring_example() assert_that( allure_report, has_test_case("test_method_label_example", has_epic("Label"), has_epic("Bdd"), has_feature("Method label")))
def test_parametrized_dynamic_feature(executed_docstring_path, feature): assert_that(executed_docstring_path.allure_report, has_test_case("test_parametrized_dynamic_feature[{feature}]".format(feature=feature), has_feature(feature), ) )
def test_single_bdd_label(executed_docstring_path): assert_that( executed_docstring_path.allure_report, has_test_case("test_single_bdd_label", has_epic("My epic"), has_feature("My feature"), has_story("My story")))
def test_dynamic_feature(executed_docstring_path): assert_that( executed_docstring_path.allure_report, has_test_case("test_dynamic_feature", has_feature("first feature"), has_feature("second feature")))