Esempio n. 1
0
def pytest_configure(config):
    report_dir = config.option.allure_report_dir
    clean = config.option.clean_alluredir

    test_helper = AllureTestHelper(config)
    # TODO: Why helper is present anyway?
    allure_commons.plugin_manager.register(test_helper)
    config.add_cleanup(cleanup_factory(test_helper))

    if report_dir:
        report_dir = os.path.abspath(report_dir)
        test_listener = AllureListener(config)
        config.pluginmanager.register(test_listener)
        allure_commons.plugin_manager.register(test_listener)
        config.add_cleanup(cleanup_factory(test_listener))

        file_logger = AllureFileLogger(report_dir, clean)
        allure_commons.plugin_manager.register(file_logger)
        config.add_cleanup(cleanup_factory(file_logger))

    config.addinivalue_line(
        "markers",
        "{mark}: allure label marker".format(mark=ALLURE_LABEL_MARK))
    config.addinivalue_line(
        "markers", "{mark}: allure link marker".format(mark=ALLURE_LINK_MARK))
    config.addinivalue_line(
        "markers", "{mark}: allure test name marker".format(
            mark=ALLURE_DISPLAY_NAME_MARK))
    config.addinivalue_line(
        "markers",
        "{mark}: allure description".format(mark=ALLURE_DESCRIPTION_MARK))
    config.addinivalue_line(
        "markers", "{mark}: allure description html".format(
            mark=ALLURE_DESCRIPTION_HTML_MARK))
Esempio n. 2
0
def pytest_configure(config):
    report_dir = config.option.allure_report_dir

    if report_dir:
        test_listener = AllureListener(config)
        config.pluginmanager.register(test_listener)

        test_helper = AllureTestHelper(config)
        config.pluginmanager.register(test_helper)
Esempio n. 3
0
    def pytest_configure(config):
        if Plugin._tep_reports(config):
            test_listener = AllureListener(config)
            config.pluginmanager.register(test_listener)
            allure_commons.plugin_manager.register(test_listener)
            config.add_cleanup(cleanup_factory(test_listener))

            clean = config.option.clean_alluredir
            file_logger = AllureFileLogger(allure_temp, clean)
            allure_commons.plugin_manager.register(file_logger)
            config.add_cleanup(cleanup_factory(file_logger))
Esempio n. 4
0
def pytest_configure(config):
    report_dir = config.option.allure_report_dir
    test_helper = AllureTestHelper(config)
    allure_commons.plugin_manager.register(test_helper)

    if report_dir:
        test_listener = AllureListener()
        config.pluginmanager.register(test_listener)
        allure_commons.plugin_manager.register(test_listener)

        file_logger = AllureFileLogger(report_dir)
        allure_commons.plugin_manager.register(file_logger)
Esempio n. 5
0
def pytest_configure(config):
    report_dir = config.option.allure_report_dir

    test_helper = AllureTestHelper(config)
    # TODO: Why helper is present anyway?
    allure_commons.plugin_manager.register(test_helper)
    config.add_cleanup(cleanup_factory(test_helper))

    if report_dir:
        test_listener = AllureListener(config)
        config.pluginmanager.register(test_listener)
        allure_commons.plugin_manager.register(test_listener)
        config.add_cleanup(cleanup_factory(test_listener))

        file_logger = AllureFileLogger(report_dir)
        allure_commons.plugin_manager.register(file_logger)
        config.add_cleanup(cleanup_factory(file_logger))
Esempio n. 6
0
def pytest_configure(config):

    if CAFY_REPO:
        archive_name = 'allure'
        ARCHIVE = os.path.join(CafyLog.work_dir, archive_name)
        os.environ['ARCHIVE'] = ARCHIVE
        config.option.allure_report_dir = ARCHIVE
        report_dir = config.option.allure_report_dir
    clean = config.option.clean_alluredir

    test_helper = AllureTestHelper(config)
    # TODO: Why helper is present anyway?
    allure_commons.plugin_manager.register(test_helper)
    config.add_cleanup(cleanup_factory(test_helper))

    if report_dir:
        test_listener = AllureListener(config)
        config.pluginmanager.register(test_listener)
        allure_commons.plugin_manager.register(test_listener)
        config.add_cleanup(cleanup_factory(test_listener))

        file_logger = AllureFileLogger(report_dir, clean)
        allure_commons.plugin_manager.register(file_logger)
        config.add_cleanup(cleanup_factory(file_logger))