Contents |
The ability for OTS to publish the information from the Testrun is an essential feature.
The standard distribution of OTS comes with a Publisher for sending results to via email. This Wiki shows you how you can easily extend OTS with your own Publishing Tool.
Publishers allow the harvesting and visualisation of data from a Testrun. The OTS framework provided is designed to allow integration with your internal systems, whether they be third-party software (e.g. a web based reporting tool) or quick-hacks to solve immediate issues (e.g. An SMS alarm system for failing Testruns)
OTS uses the common Python distribution mechanism provided by setuptools. This also forms the basis of the Plugins.
There is plenty of third party documentation for this (for example this Wiki from the Trac Project). But hopefully the following HowTo and example will show you all that you need to know to start hacking.
We have found that Publishers tend to be interdependent and this is supported by OTS. For example an Email Publisher might want to incorporate links to a web bases Reporting Publisher in an email message.
This example shows a very simple publisher written in PySide. The complete code listing is in the OTS source tree.
Your Publisher should support the interface suggested by PublisherPluginBase.
Check out the PySidePublisher example.
The Entry point in setup.py should be:
[ots.publisher_plugin]
OTS can pick up the Publisher either as a formal installation or as a Plugin.
One way to contribute to OTS is to install directly from the source code on the target:
python setup.py install
The following steps describe other means of contributing a Publisher to OTS.
In the same directory as setup.py
python setup.py bdist_egg
The build Egg can be seen in the dist sub-directory
The Egg is a distributable. It can be installed using:
easy_install PySidePublisher-0.8-py2.6.egg
Package management is another option.
A Debian package can be created and setuptools allow for direct creation of RPMs
python setup.py bdist_rpm
If you want to take more of a 'Plugin approach' with your Publisher just move the Egg you have just built (in the dist sub directory) into the plugins directory.
Currently under ots.server/ots/server/plugins. FIXME make more user friendly
Run the demo
python demo_pub_plugin.py
This shows how the Publisher Plugin in action. Stubs are used to mimic a Testrun