pytest-bugzilla-notifier
This plugin currently has the following functionality:
posts the results of test runs to be added to existing Bugzilla tickets
create new tickets as part of a pytest test
read bugs given a bug ID
search for bugs given a search
Installation
You can install “pytest-bugzilla-notifier” via pip from PyPI:
$ pip install pytest-bugzilla-notifier
Pre-requisites
To use this plugin you need to have a username and password for a Bugzilla account. First, you need to copy bugzilla.ini-dist to bugzilla.ini and add in the BugZilla API key you will be using to access Bugzilla.
Reporting test runs
You can use the plugin to update a ticket with the results by using the following command:
$ pytest --bug=<bug ID> --config=./bugzilla.ini --bugzilla-url=<server> /path/to/tests
<bug ID> The ID that Bugzilla assigned to the bug you wish to have the test results sent to.
<server> The full URL to the Bugzilla instance you wish to send test results to (eg https://bugzilla.mozilla.com)
Creating new tickets
To create a new ticket in Bugzilla, you need to import the library using:
from pytest_bugzilla_notifier.bugzilla_rest_client import BugzillaRESTClient
and then you can create bugs using code similar to this:
api_details = {
'bugzilla_host': '<bugzilla host you are using>',
'bugzilla_api_key': '<bugzilla API key>'
}
rest_client = BugzillaRESTClient(api_details)
bug_data = {
'product': 'Firefox',
'component': 'Developer Tools',
'summary': 'Test Bug',
'version': 'unspecified'
}
bug_id = rest_client.bug_create(bug_data)
If everything worked as expected, bug_id will contain the ID BugZilla has assigned to your ticket.
Reading Bug Details
If you know the ID for a bug, you can read in the details:
api_details = {
'bugzilla_host': '<bugzilla host you are using>',
'bugzilla_api_key': '<bugzilla API key>'
}
rest_client = BugzillaRESTClient(api_details)
bug_id = <bug ID>
response = rest_client.bug_read(bug_id)
Searching For Bugs
You can follow the outlines for search parameters and then submit your search request:
api_details = {
'bugzilla_host': '<bugzilla host you are using>',
'bugzilla_api_key': '<bugzilla API key>'
}
rest_client = BugzillaRESTClient(api_details)
search_details = {
'product': 'Firefox',
'component': 'Developer Tools',
'summary': 'Test Bug',
}
bug_id = rest_client.bug_search(search_details)
Contributing
Contributions are very welcome. Tests can be run with tox, please ensure that the test suite passed before submitting a pull request.
License
Distributed under the terms of the Mozilla Public License 2.0 license, “pytest-bugzilla-notifier” is free and open source software.
Issues
If you encounter any problems, please file an issue along with a detailed description.
Metadata
Release files for pytest-bugzilla-notifier 1.1.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pytest-bugzilla-notifier-1.1.9.tar.gz | 10.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pytest_bugzilla_notifier-1.1.9-py2-none-any.whl | Python 2 | none | any | Details |
Total release size: 16.4 kB
Release files / pytest-bugzilla-notifier-1.1.9.tar.gz
| Download URL | pytest-bugzilla-notifier-1.1.9.tar.gz |
|---|---|
| Size | 10.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
53444067d5a74eea43e87bd50b1868b0d589bb8450ed0e258923bc70f055e89f
|
|
BLAKE2b-256 checksum How to use checksums |
062ed7549df4b3d472b814dfba42c669725d2380824618aad17413f00f848bcc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / pytest_bugzilla_notifier-1.1.9-py2-none-any.whl
| Download URL | pytest_bugzilla_notifier-1.1.9-py2-none-any.whl |
|---|---|
| Size | 6.0 kB |
| Tags | Python 2 |
|
SHA-256 checksum How to use checksums |
068ef0c6ebbbfc8a66945ea5b16e84d60f482e495394f035c613ce4b32bd71d8
|
|
BLAKE2b-256 checksum How to use checksums |
4a5e8e2f47af0b3815e5e744ddbe44f79b096449af212754f348ff9a6e92fa40
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |