skip to navigation
skip to content

pytest-bugzilla-notifier 1.1.0

A plugin that allows you to post test runs to BugZilla tickets and create new tickets


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


You can install "pytest-bugzilla-notifier" via `pip`_ from `PyPI`_::

$ pip install pytest-bugzilla-notifier


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.

The full URL to the Bugzilla instance you wish to send test results to

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.

Contributions are very welcome. Tests can be run with `tox`_, please ensure
that the test suite passed before submitting a pull request.


Distributed under the terms of the `Mozilla Public License 2.0`_ license, "pytest-bugzilla-notifier" is free and open source software.


If you encounter any problems, please `file an issue`_ along with a detailed description.

.. _`Mozilla Public License 2.0`:
.. _`file an issue`:
.. _`pytest`:
.. _`tox`:
.. _`pip`:
.. _`PyPI`:

File Type Py Version Uploaded on Size
pytest-bugzilla-notifier-1.1.0.tar.gz (md5) Source 2018-01-29 9KB
pytest_bugzilla_notifier-1.1.0-py2-none-any.whl (md5) Python Wheel py2 2018-01-29 7KB