/allure-pytest

Deprecated, please use https://github.com/allure-framework/allure-python instead

Primary LanguagePythonOtherNOASSERTION

[DEPRICATED]

Please follow https://github.com/allure-framework/allure-python ===================== Allure Pytest Adaptor =====================

Join the chat at https://gitter.im/allure-framework/allure-core

Build Status

Release Status

Downloads

This repository contains a plugin for py.test which automatically prepares input data used to generate Allure Report. Note: this plugin currently supports only Allure 1.4.x series.

Installation and Usage

This plugin gets automatically connected to py.test via entry point if installed.

Connecting to IDE:

Allure Features

Attachments

To attach some content to test report:

Steps

To divide a test into steps:

Can also be used as decorators. By default step name is generated from method name:

Steps can also be used without pytest. In that case instead of pytest.allure.step simply use allure.step:

allure.step decorator supports step name formatting with function parameters:

The step in the latter case will have name some operation for bar=abcdef. Formatting is done via python's built-in string.format and supports it's options. Arguments are passed to format method in the same way they are passed to the decorated function.

Steps support is limited when used with fixtures.

Severity

Any test, class or module can be marked with different severity:

To run tests with concrete priority:

Issues

Issues can be set for test.

Test cases

Test cases links can be set for test also.

Features & Stories

Feature and Story can be set for test.

To run tests by Feature or Story:

Environment Parameters

You can provide test environment parameters such as report name, browser or test server address to allure test report.

More details about allure environment you can know from documentation.

Development

Use allure.common.AllureImpl class to bind your logic to this adapter.