On Mon, May 24, 2004 at 02:55:34PM +1000, Andrew Savige wrote:
> Suppose I fix a bug with a unique bug ID in a bug tracking system.
> I start by dutifully adding 15 new asserts, say, to an existing unit
> test program, to duplicate the bug before I fix it. What if I later
> want some way to map the bug ID back to the these 15 new asserts?
> Should I somehow assign unique IDs to my unit tests -- if so, at what
> level of granularity? If I keep some sort of external test case
> database, I'm worried about the overhead of keeping my (typically
> fairly volatile) unit test programs in sync with the database.

Put the bug ID in a comment in some consistent format.  Grep the test files.

  # RT 23462
  is( 3**3, 27 );

Put the bug ID in the test name in some consistent format.  Grep the test
files and/or output.

  is( 3**3, 27, 'RT 23462' );

grep: we don't need no stinking database.


-- 
Michael G Schwern        [EMAIL PROTECTED]  http://www.pobox.com/~schwern/
<mendel>         ScHWeRnsChweRN    sChWErN   SchweRN  SCHWErNSChwERnsCHwERN    
  sChWErn  ScHWeRn      schweRn           sCHWErN           schWeRn    scHWeRN 
   SchWeRN      scHWErn SchwErn       scHWErn       ScHweRN       sChwern      
scHWerN        scHWeRn           scHWerN        ScHwerN       SChWeRN scHWeRn  
        SchwERNschwERn        SCHwern  sCHWErN   SCHWErN           sChWeRn 

Reply via email to