def test_custom_label(executed_docstring_path):
    assert_that(executed_docstring_path.allure_report,
                has_test_case("test_custom_label",
                              has_label("Application", "desktop"),
                              has_label("Application", "mobile")
                              )
                )
Beispiel #2
0
 def test_threads(self):
     assert_that(
         self.allure_report,
         has_test_case(
             'Case With Thread #0',
             has_label('thread', 'Thread #0')
         ),
         has_test_case(
             'Case With Thread #1',
             has_label('thread', 'Thread #1')
         )
     )
Beispiel #3
0
def test_display_name_with_features(allured_testdir):
    allured_testdir.testdir.makepyfile("""
        import allure
        import pytest

        @allure.feature('Feature 1')
        @allure.title('Titled test with features')
        @allure.feature('Feature 2')
        def test_feature_label_for_titled_test():
            pass
        """)

    allured_testdir.run_with_allure()

    assert_that(
        allured_testdir.allure_report,
        has_test_case("test_feature_label_for_titled_test",
                      has_label("feature", "Feature 1"),
                      has_label("feature", "Feature 2"),
                      has_title("Titled test with features")))
def test_allure_ee_id_label(executed_docstring_source):
    """
    >>> import allure

    >>> @allure.id(123)
    ... def test_allure_ee_id_label_example():
    ...     pass
    """
    assert_that(executed_docstring_source.allure_report,
                has_test_case("test_allure_ee_id_label_example",
                              has_label("as_id", 123),
                              )
                )
Beispiel #5
0
def has_sub_suite(suite):
    return has_label('subSuite', suite)
Beispiel #6
0
def has_parent_suite(suite):
    return has_label('parentSuite', suite)
Beispiel #7
0
def test_custom_label(executed_docstring_path):
    assert_that(
        executed_docstring_path.allure_report,
        has_test_case("test_custom_label", has_label("Application", "desktop"),
                      has_label("Application", "mobile")))