ODBC, Bugzilla and when can we ship the damn thing
November 30, 2006
One of the metrics I like to use to measure the state of a project, particularly when in the QA phase, is the bug find vs bug fix rate. In my experience the curve is always a bell curve (i.e. the bug find rate ramps up to a peak and then ramps back down at about the same rate). If your bug find rate is still climbing it’s not suddenly going to stop unless the QA team goes on a vacation. At Flock, the unit of time is daily (longer projects may want to use weekly). This does lead to some anomolies but in general you’ll still get the same bell curve.
At a couple of companies now I’ve setup excel to read directly from the Bugzilla database to get the pretty graphs (Never could figure out how to do time charts in Bugzilla). First thing I do is create a read only account for the bugs database (no, that isn’t the actual user name I use).
mysql> grant select on bugs.* to ‘abcd’@'%’ identified by ‘efgh’;
Query OK, 0 rows affected (0.03 sec)mysql> grant select on bugs.* to abcd identified by ‘efgh’;
Query OK, 0 rows affected (0.03 sec)
Daryl Houston, anunderstated SQL master (I suck at anything more complicated than anUPDATE statement) with a convenient, at least for me, case ofoccasional insomnia gave me the following bugzilla queries (I editedthem a little bit to let excel do some of the work).
To find bugs that have been fixed on a certain day I use the following query. The hard part is getting the fix date out of the activity table.
SELECT DATE_FORMAT(bug_when, ‘%m/%d/%Y’) fixed, COUNT(*)
FROM bugs b, bugs_activity a
WHERE b.bug_id = a.bug_id AND a.added = ‘FIXED’ AND b.target_milestone = ‘Danphe RC 1′
GROUP BY fixed ORDER BY a.bug_when
The found bugs, i.e. bugs created, has an easier query:
select DATE_FORMAT(b.creation_ts, ‘%m/%d/%Y’) created, COUNT(*)
FROM bugs b
WHERE b.target_milestone = ‘Danphe RC 1′
GROUP BY created ORDER BY b.creation_ts)
Once I have this data I create two graphs. One that shows cumulative bug found and bug fix data. At the end of the project, the two lines should meet. The other graph, as I mentioned about ultimately turns out to be two bell curves of bugs found slightly lagged (hopefully) by number of bugs fixed. At the end of the current project I’m working on at Flock I’ll post some examples.
Blogged with Flock
