Abstract
The currect bug reporting procedure is absolutely critical to improve the quality of ZEOS. It defines steps to fix bugs, to notify the reported user about the change and update the test harness to ensure the bug will never happen again. Unfortunately in free ware projets it's hard to maintain good test coverage. The Bug Report procedure allows to improve the test coverage and to increase the stability of the Libary afterward, when the code is written and released. It relieves developers because writing tests is partially moved to responsibilities of QA group.
Table of Contents
A "valid" bug report has to contain the following informations:
Database server and server version
Version of used components
Name component or class that raised the error
Information about user properties for components and/or classes
Exact description of the error
Sql query and table(s) structure and table(s) data for user specified table(s)
If it is necessary and possible the user may be asked for a sample application that reproduces the error
User submits a bug report on SourceForge Bug Tracker.
Elaborate information about the bug and close the bug if it has no sense. Notify the user about the action taken and exlain why this was done (performed by QA Group)
Implement a Bug Report Test Case which relicates the problem (performed by QA Group)
Switch the bug to the responsible developer
Fix the bug. Document yor changes in sourcecode, carefully! (performed by responsible developer)
Fill out the bug report e-Form and document your doings, carefully! The given Template (bug_report_form.txt has to be saved as BugID.txt where ID means the Bug's ID from the SourceForge Bug Tracker.
Close the bug report and notify the user about the changes done (if possible) and mention when it will be officially released (performed by responsible developer)
Bug Report Tests is a special category of tests it is obvious that bugs may happen in all groups of finctional tests described before. From that p erspective Bug Report Tests should repeat the hierarchy of functional tests:
TZAbstractBugReportTestCase - a base abstract class for Bug Report Tests.
TZGenericBugReport, TZPortableSQLBugReport and TZSpecificSQLBugReport - abstract classes for "Generic", "SQL Prtable" and "SQL Specific" tests.
TZCompPortableSQLBugReport, TZCompMySQLBugReport, TZCompInterbaseBugReport, TZDbcPortableSQLBugReport, TZDbcMySQLBugReport, TZDbcInterbaseBugReport, etc. - specific test cases.
For Bug Report Test cases we set a convention to name test methodes as "Test" + ID, where ID is a unique number of associated bug report in Bug Tracker on SourceForge. That convention allows us to do following things:
Enforce creation of bug repot for each found bug.
Easy navigate between bug reports and related test cases.
TZCompPortableSQLBugReport, TZCompMySQLBugReport, TZCompInterbaseBugReport, TZDbcPortableSQLBugReport, TZDbcMySQLBugReport, TZDbcInterbaseBugReport, etc. - specific test cases.
During bug fixing developer usually have to run a specific test case many times. To speed up the process we added to TZAbstractBugReportTestCase class a convenient function called SkipClosed. If SkipClosed property ist set to true for "bugreport" category in configuration file, SkipClosed returns true and allows to skip completed tests for fixed bugs. It dramatically decreases number of tests to run and makes developer's vork much more productive.
UNIT ZTestCompCore; INTERFACE {$I ZBugReport.inc} USES Classed, DB, TestFramework, ZDataset, ZConnection, ZDbcIntfs, ZBugReport, ZCompatibility, ZSqlUpdate, ZSqlProcessor; TYPE ZTestCompCoreBugReport = class (TZPortableSQLBugReportTestCase) : published : Procedure Test833197; : End; IMPLEMENTATION : {** Bugreport #833197: Refresh problem with filtered data. } Procedure ZTestCompCoreBugReport.Test833197; Var Connection: TZConnection; Query : TZQuery; Begin If SkipClosed Then Exit; Connection := Self.CreateDatasetConnection; Query := TZQuery.Create (nil); Query.Connection := Connection; Query.SQL.Text := 'SELECT * FROM poeple'; Try Query.Open; Query.Filter := 'p_name = "Aleksey Petrov"'; Query.Filtered := True; CheckEquals (1, Query.RecordCount); Query.Refresh; CheckEquals (1, Query.RecordCount); Query.Close; Finally Connection.Free; Query.Free; End; End; // Test833197 : INITIALIZATION TestFramework.RegisterTest (ZTestCompCoreBugReort.Suite); End.