From Fedora Project Wiki

(Partial first draft)
 
(move hook info to its own page, add category, add draft heading)
Line 1: Line 1:
{{draft}}
AutoQA is an automated test system for Fedora. Its basic design is simple: when certain events occur (a package is built, updates are pushed, a new Rawhide build is available, etc.) autoqa launches some automated tests.
AutoQA is an automated test system for Fedora. Its basic design is simple: when certain events occur (a package is built, updates are pushed, a new Rawhide build is available, etc.) autoqa launches some automated tests.


Line 7: Line 8:
For example, the <code>post-repo-update</code> hook is triggered whenever a Fedora repo is updated. Obviously, any test that will run in response to this event will need to know the URL of the repo that was just updated. (This is a <i>required</i> argument.) Certain repos can't be used properly without other "parent" repos (for example, the Fedora 11 <code>updates</code> repo isn't useful without also knowing the address of the main Fedora 11 repo). So a list of "parent repos" is an <i>optional argument</i> to the tests.
For example, the <code>post-repo-update</code> hook is triggered whenever a Fedora repo is updated. Obviously, any test that will run in response to this event will need to know the URL of the repo that was just updated. (This is a <i>required</i> argument.) Certain repos can't be used properly without other "parent" repos (for example, the Fedora 11 <code>updates</code> repo isn't useful without also knowing the address of the main Fedora 11 repo). So a list of "parent repos" is an <i>optional argument</i> to the tests.


The <code>hooks/</code> directory in the <code>autoqa</code> source tree contains the hooks that AutoQA knows about. A hook has five main parts:
Detailed information about implementing new hooks can be found in [[Writing AutoQA Hooks]].
 
# <code>README</code>
#* describes the event itself and the required (and optional) arguments that will be passed along to the tests.
# <code>hook.py</code>
#* python code that is used to parse the test arguments, as described in the <code>README</code> file. This is the formal definition of the test arguments.
# <code>testlist</code>
#* contains the list of test names that will be launched when this hook is triggered.
# <code>control.template</code> and <code>test_class_template.py</code>
#* generic templates for creating new tests that use this hook. See below for more information on writing new tests.
# Watcher
#* This is the code that watches for the event and launches the <code>autoqa</code> harness with the arguments described in <code>README</code> and <code>hook.py</code>.
#* Currently, all existing watchers are scripts that get run periodically by <code>crond</code> to check to see if the event has occurred since the last time it was run. If so, it launches <code>autoqa</code>.
#* In the future this will change to a daemon that waits for notifications about the event - see the [[Messaging SIG]]'s [[Publish Subscribe Notification Proposal]] for further info about that.
 
Detailed information about implementing new hooks will be found in [[Writing AutoQA Hooks]].


== The autoqa Harness ==
== The autoqa Harness ==


The autoqa harness is launched by the watchers in response to an event.
The autoqa harness is launched by the watchers in response to an event.
[[Category:AutoQA]]

Revision as of 21:21, 24 August 2009

Warning.png
This page is a draft only
It is still under construction and content may change. Do not rely on the information on this page.

AutoQA is an automated test system for Fedora. Its basic design is simple: when certain events occur (a package is built, updates are pushed, a new Rawhide build is available, etc.) autoqa launches some automated tests.

Events and Hooks

For AutoQA to respond to an event, someone needs to write a "hook" for that event. The first step in creating a new hook is, obviously, to define the event it responds to.

For example, the post-repo-update hook is triggered whenever a Fedora repo is updated. Obviously, any test that will run in response to this event will need to know the URL of the repo that was just updated. (This is a required argument.) Certain repos can't be used properly without other "parent" repos (for example, the Fedora 11 updates repo isn't useful without also knowing the address of the main Fedora 11 repo). So a list of "parent repos" is an optional argument to the tests.

Detailed information about implementing new hooks can be found in Writing AutoQA Hooks.

The autoqa Harness

The autoqa harness is launched by the watchers in response to an event.