Nose plugin for allure framework
Project description
Nose Allure Plugin
It is a port of pytest-allure-adaptor for nose framework.
Usage
nosetests --with-allure --logdir=/path/to/put/results
Supported features
Attachment
To attach some content to test report:
import nose
def test_foo():
nose.allure.attach('my attach', 'Hello, World')
Step
To divide a test into steps:
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:
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
You can provide test environment parameters such as report name, browser or test server address to allure test report.
import nose
def test_dummy():
nose.allure.environment(report='Allure report', browser=u'Firefox')
Severity
Any test, class or module can be marked with different severity:
import nose
@nose.allure.severity(nose.allure.severity_level.CRITICAL)
class TestBar(object):
def test_bar(self):
pass
# custom severity
@nose.allure.severity("hard")
def test_bar(self):
pass
To run tests with concrete priority:
nosetests my_tests/ --with-allure --logdir=tmp --severity="critical, hard"
Issue
Issues can be set for test.
import nose
@nose.allure.issue('http://jira.lan/browse/ISSUE-1')
def test_foo():
assert False
Features & Stories
Feature and Story can be set for test.
import nose
@nose.allure.feature('Feature1')
@nose.allure.story('Story1')
def test_minor():
assert False
@nose.allure.feature('Feature2')
@nose.allure.story('Story1')
class TestBar(object):
def test_bar(self):
pass
To run tests by Feature or Story:
nosetests my_tests/ --with-allure --logdir=tmp --feature="Feature1, Feature2"
nosetests my_tests/ --with-allure --logdir=tmp --feature="Feature1, Feature2" --story="Story1, Story2"
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nose-allure-plugin-1.0.tar.gz.
File metadata
- Download URL: nose-allure-plugin-1.0.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6173f280d7f1871aa63ad004fac81b20c5749e8eff66fb1390ff3ce464e5864e
|
|
| MD5 |
69663e321f4b224941046194f4637ba8
|
|
| BLAKE2b-256 |
45b8d864ff3b3e231e63c5357fe7fdcf2444f888ecf0ea95685d503f437e7e86
|
File details
Details for the file nose_allure_plugin-1.0-py2-none-any.whl.
File metadata
- Download URL: nose_allure_plugin-1.0-py2-none-any.whl
- Upload date:
- Size: 6.4 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fed15c996c60d4c680f06050a06837d8f7a967a417a44d4460005b9c67717433
|
|
| MD5 |
21928ad33817f3d3881cd224218d8475
|
|
| BLAKE2b-256 |
44910802c4d7e045386299f0c37420524d64b8fb80bf753db9bef4e7cba87936
|