Nose plugin for allure framework
Project description
It is a port of [pytest-allure-adaptor](https://github.com/allure-framework/allure-python) for [nose framework](https://github.com/nose-devs/nose).
##Usage
``` bash
nosetests --with-allure --logdir=/path/to/put/results
```
##Supported features
####Attachment
To attach some content to test report:
``` python
import nose
def test_foo():
nose.allure.attach('my attach', 'Hello, World')
```
####Step
To divide a test into steps:
``` python
import nose
def test_foo():
with nose.allure.step('step one'):
# do stuff
with nose.allure.step('step two'):
# do more stuff
```
Can also be used as decorators. By default step name is generated from method name:
``` python
import nose
@nose.allure.step
def make_test_data_foo():
# do stuff
def test_foo():
assert make_some_data_foo() is not None
@nose.allure.step('make_some_data_foo')
def make_some_data_bar():
# do another stuff
def test_bar():
assert make_some_data_bar() is not None
```
####Environment Parameters
You can provide test [environment parameters](https://github.com/allure-framework/allure-core/wiki/Environment) such as report name, browser or test server address to allure test report.
``` python
import nose
def test_dummy():
nose.allure.environment(report='Allure report', browser=u'Firefox')
```
##Usage
``` bash
nosetests --with-allure --logdir=/path/to/put/results
```
##Supported features
####Attachment
To attach some content to test report:
``` python
import nose
def test_foo():
nose.allure.attach('my attach', 'Hello, World')
```
####Step
To divide a test into steps:
``` python
import nose
def test_foo():
with nose.allure.step('step one'):
# do stuff
with nose.allure.step('step two'):
# do more stuff
```
Can also be used as decorators. By default step name is generated from method name:
``` python
import nose
@nose.allure.step
def make_test_data_foo():
# do stuff
def test_foo():
assert make_some_data_foo() is not None
@nose.allure.step('make_some_data_foo')
def make_some_data_bar():
# do another stuff
def test_bar():
assert make_some_data_bar() is not None
```
####Environment Parameters
You can provide test [environment parameters](https://github.com/allure-framework/allure-core/wiki/Environment) such as report name, browser or test server address to allure test report.
``` python
import nose
def test_dummy():
nose.allure.environment(report='Allure report', browser=u'Firefox')
```
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for nose_allure_plugin-0.1a1-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b168117ca0718aec39469f1e98ec0f296cc4d2b21530b27d5511d59e7b2641be |
|
MD5 | 3a7393f9e8b063255489ac8fef91e9ef |
|
BLAKE2b-256 | dae8c4563af2bdeab987196049b464a5de6a9d8b7d58b9ac765b0d2f49548e97 |