Browse Prior Art Database

qadiff - An algorithm for comparing test results in automated test systems Disclosure Number: IPCOM000011973D
Original Publication Date: 2003-Mar-27
Included in the Prior Art Database: 2003-Mar-27
Document File: 3 page(s) / 56K

Publishing Venue




This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 54% of the total text.

Page 1 of 3

qadiff - An algorithm for comparing test results in automated test systems

   Most automated test systems use a variant of the UNIX* diff program to compare the actual and expected results. This, however, has many problems.

Results can change from day to day depending on things such as dates. Simple changes to the product such as changing the version string can require corresponding changes to a lot of expected result files. Ordering differences caused by timing within the tests often causes problems. Different platforms or environments often produce slightly different results requiring special result files to be managed.

qadiff is an extension to the standard UNIX diff algorithm to overcome these problems but still report on every difference between the expected and actual results files.

qadiff introduces several new features into diff via markers in the expected results file.

Patterns allow regular expressions to be defined to match things such as dates and version strings. These patterns can be centrally defined allowing changes to a large number of expected result files to be handled very easily.

For example, given the pattern $DATE defined to match a date, the expected results entry:

Todays date is $DATE

Will match any line starting with "Todays date is " and ending with a valid date.

Order blocks can be defined in the expected results file to cause a block of results to be matched in any order.

For example the expected results file:







Will match the records 1,2,3,4,5 in any order.

Choice blocks can be defined in the expected results file to cause a series of options for the expected results to be allowed.


Page 2 of 3

For example the expected results file:


Will match either "choice1" or "choice2".

The standard UNIX diff algorithm works as follows:

Both files are hashed.

The hash tables are sorted by hash value and any unique values found (i.e., any

hash values that occur exactly once in each file). These lines are likely matches (although not guaranteed due to the possibility that

the two different lines may hash to the same value). The hash table is resorted back into file line order.

Each of the potentially matching lines found in step 2 are compared and the lines

before and after are also compared to expand outwards the block of matching lines. Hash values for matching lines are reset to some invalid value to make it more likely

that the next pass will find unique hash values. Steps 2-6 are repeated un...