# QBrew Test Procedure

## Setup

This procedure will make use of the the included files `paleale.qbrew` and `stout.qbrew`. In addition, the Configure dialog should be set with default values using the Defaults buttons.

## User Interface

### Command Line

- [___] Verify that the following command line options result in the indicated behavior under Unix:

  file | Open the specified file in QBrew
  -help | Print the command line options
  -version | Print the version number of QBrew

- [___] Verify that all other command line options displayed by the `-help` option are currently used by Qt and behave as described.

### Menubar

- [___] Verify that all menu accelerators work and are mapped to the appropriate keystroke
- [___] Verify that an appropriate help message is displayed in the statusbar when each menu item is highlighted

### File Menu

- [___] Verify that the File->New menu item creates a new, blank recipe
- [___] Verify the File->Open... menu item opens an existing recipe file
- [___] Verify the File->Open Recent item displays a submenu of recently opened files
- [___] Verify the File->Save menu item save the current recipe to a recipe file under the same file name. If this is a new recipe, verify this behaves identically to the File->Save as... menu item
- [___] Verify the File->Save as... menu item saves the current recipe to a recipe file, prompting for a new file name, and prompting to overwrite existing files if applicable
- [___] Verify the File->Export... menu item exports the current recipe to a different format, prompting for a filename, and prompting to overwrite existing files if applicable
- [___] Verify the File->Print Preview... menu item brings up a print preview dialog
- [___] Verify the File->Print... menu item brings up a print dialog that prints the recipe
- [___] Verify the File->Quit menu item quits the application, after prompting to save any unsaved recipes

### Tools Menu

- [___] Verify the Tools->Alcohol Percentage menu item brings up the Alcohol Tool window
- [___] Verify the Tools->Hydrometer Correction menu item brings up the Hydrometer Tool window
- [___] Verify the Tools->Database Editor menu item brings up the database editor

### Options Menu

- [___] Verify the Options->Main Toolbar menu item toggles the toolbar between enabled and disabled states
- [___] Verify the Options->Statusbar menu item toggles the statusbar between enabled and disabled states
- [___] Verify the Options->Configure... menu item brings up the configure dialog

### Help Menu

- [___] Verify the Help->Contents... menu item brings up a browser window displaying the application's user manual
- [___] Verify the Help->Primer... menu item brings up a browser window displaying a brewing primer
- [___] Verify the What's This? menu item brings up cursor used to select help on specific controls
- [___] Verify the Help->About... menu item brings up a message box displaying the application's copyright information

### Toolbar

- [___] Verify that the following buttons are on the toolbar by default: New, Open, Save, Print, and Context
- [___] Verify that all buttons in the toolbar correspond to a menu item in the menubar
- [___] Verify that each button in the toolbar has an appropriate tooltip and an appropriate Context help entry
- [___] Verify that the toolbar can be docked to each side of the application

### Statusbar

- [___] Verify that the statusbar has only a message area
- [___] Verify that the statusbar displays no message longer than two seconds

### Configure Dialog

- [___] Verify that all controls are visible in the dialog box
- [___] Verify that pressing OK or Cancel removes the dialog window
- [___] Verify that pressing Apply of OK makes all changes take effect immediately (as appropriate)
- [___] Verify that pressing the Reset button resets all dialog controls to default values
- [___] Verify that all options in a dialog page are related to the title of the page
- [___] Verify that the Look and feel combobox is used to select a Qt widget style
- [___] Verify that the Show splash screen checkbox is used to select whether the splash screen is shown at program start
- [___] Verify that the Number of recent files spinbox selects the number of files displayed in the Open Recent submenu
- [___] Verify that the Enable autosave checkbox and spinbox set autosave functionality, where the currently edited file will be automatically saved according to the selected interval
- [___] Verify that the Enable autobackup checkbox sets autobackup functionality, where a backup will be created upon saving changes to a recipe
- [___] Verify that the Load last file checkbox will cause the application to automatically load the last recipe used
- [___] Verify the Measurement units combo box contains entries for Metric and US
- [___] Verify that while the Measurement units option is set to Metric, all subsequent units will be in Metric (grams, kilograms, liters)
- [___] Verify that while the Measurement units option is set to US, all subsequent units will be in US measurements (ounces, pounds, gallons)
- [___] Verify that the Mash efficiency spinbox sets the recipe mash efficiency, in the range of 0.00 to 1.00 in increments of 0.01
- [___] Verify that the Steep yield spinbox sets the yield for steeped grains, in the range of 0.00 to 1.00 in increments of 0.01
- [___] Verify that the Use Tinseth checkbox toggles the application calculation routines to use the Tinseth bitterness formula instead of the default (Rager) bitterness formula
- [___] Verify that the Use Morey checkbox toggles the application calculation routines to use the Morey color formula instead of the default (Daniels) color formula
- [___] Verify that the Batch size spinbox selects the default back size for new recipes, in the range of 0.00 to 100.00 in increments of 0.25
- [___] Verify that the Recipe style combobox selects the default recipe style for new recipes
- [___] Verify that the Hop Type combobox selects the default hop type for new hop ingredients

### Alcohol Tool

- [___] Verify that the Original gravity spinbox ranges from 0.900 to 1.400 in increments of 0.001
- [___] Verify that the Final gravity spinbox ranges from 0.900 to 1.400 in increments of 0.001
- [___] Verify that the Alcohol by Volume label displays the calculated ABV
- [___] Verify that the Alcohol by Weight label displays the calculated ABW

### Hydrometer Tool

- [___] Verify that the Sample temperature spinbox has the suffix of "°F", and ranges from 32.0 to 212.0 in increments of 0.2. If Metric measurements are used, verify that the suffix is "°C", and ranges from 0.0 to 100.0 degrees.
- [___] Verify that the Calibrated temperature spinbox has the suffix of "°F", and ranges from 32.0 to 212.0 in increments of 0.2. If Metric measurements are used, verify that the suffix is "°C", and ranges from 0.0 to 100.0 degrees.
- [___] Verify that the Hydrometer reading spinbox has no suffix and ranges from 0.850 to 1.200 in increments of 0.001
- [___] Verify that the Corrected reading label has no suffix, and changes as the values in the spinboxes change

### Database Editor

#### Grains

- [___] Verify that selecting the Grains tab changes the list section to controls for grain ingredients
- [___] Verify that the list of ingredients in the displayed in the list section matches the selection available in the database file
- [___] Verify that the Grain field can be edited by the user
- [___] Verify that the Extract field can be edited and its spinbox ranges from 1.000 to 1.100 in increments of 0.001
- [___] Verify that the Color field can be edited and its spinbox ranges from 0.0 to 500.0 in increments of 1.0
- [___] Verify that the Type field combobox has the entries of Grain, Extract, Adjunct, Sugar and Other, and that the combobox is not user editable.
- [___] Verify that the Use field combobox has the entries of Extract, Mashed, Steeped, and Other, and that the combobox is not user editable
- [___] Verify that setting the Grain field of an entry to blank removes the grain from the list
- [___] Verify that attempting to add a grain that already exists in the database will prompt a confirmation dialog

#### Hops

- [___] Verify that selecting the Hops tab changes the list section to controls for hop ingredients
- [___] Verify that the list of ingredients in the displayed in the list section matches the selection available in the database file
- [___] Verify that the Hop field combobox can be edited by the use
- [___] Verify that the Alpha field has a spinbox with a suffix of "%", and ranges from 0.0 to 50.0 in increments of 0.1
- [___] Verify that setting the Hop field of an entry to blank removes the hop from the list
- [___] Verify that attempting to add a hop that already exists in the database will prompt a confirmation dialog

#### Miscellaneous

- [___] Verify that selecting the Miscellaneous tab changes the ingredients section to controls for miscellaneous ingredients
- [___] Verify that the list of ingredients in the displayed in the list section matches the selection available in the database file
- [___] Verify that the Misc field has a combobox that can be edited by the user
- [___] Verify that the Type field has a combobox with the entries Yeast, Fining, Herb, Spice, Flavor, Additive and Other.
- [___] Verify that the Notes field has an editbox which is editable by the user
- [___] Verify that setting the Misc field of an entry to blank removes the ingredient from the list
- [___] Verify that attempting to add an ingredient that already exists in the database will prompt a confirmation dialog

#### Styles

- [___] Verify that selecting the Styles tab changes the list section to controls for styles
- [___] Verify that the list of styles in the displayed in the list section matches the selection available in the database file
- [___] Verify that the Style field has a combobox that can be edited by the user
- [___] Verify that the Min. OG and Max. OG fields have spinboxes that range from 1.000 to 1.150 in increments of 0.001
- [___] Verify that the Min. OG spinbox has a maximum value equal to the minimum value of the Max. OG spinboxes, and vice versa
- [___] Verify that the Min. FG and Max. FG fields have spinboxes that range from 1.000 to 1.150 in increments of 0.001
- [___] Verify that the Min. FG spinbox has a maximum value equal to the minimum value of the Max. FG spinboxes, and vice versa
- [___] Verify that the Min. IBU and Max. IBU fields have spinboxes that range from 0 to 120 in increments of 1
- [___] Verify that the Min. IBU spinbox has a maximum value equal to the minimum value of the Max. IBU spinboxes, and vice versa
- [___] Verify that the Min. SRM and Max. SRM fields have spinboxes that range from 0 to 50 in increments of 1
- [___] Verify that the Min. SRM spinbox has a maximum value equal to the minimum value of the Max. SRM spinboxes, and vice versa
- [___] Verify that setting the Style field of an entry to blank removes the style from the list
- [___] Verify that attempting to add an style that already exists in the database will prompt a confirmation dialog

### Help Browser

- [___] Verify that the Contents and Primer help browser contains File->Print..., File->Quit, Navigate->Backward, Navigate->Forward, and Navigate->Home menu items.
- [___] Verify that the Contents and Primer help browser contains Back, Forward, Home, Print and Quit toolbar buttons
- [___] Verify that local links embedded in the Contents and Primer help browser content are active and usable

### Recipe and Characteristics

- [___] Verify that the Title and Brewer editboxes have no effect on any recipe calculations or other displayed information
- [___] Verify that the Style combobox displays a list of beer styles corresponding to all style entries in the `qbrewdata` file
- [___] Verify that changing the Style combobox entry immediately changes the Minimum Gravity, Maximum Gravity, Minimum Bitterness, Maximum Bitterness, Minimum Color and Maximum Color labels in the Characteristics frame, as well as the Characteristics frame's title
- [___] Verify that the Size spinbox displays the application batch size (set in the Configure dialog) by default, with a range from 0.00 to 5000.00 in increments of 0.25
- [___] Verify that any changes to the Size spinbox results in an immediate change to the Recipe Gravity, Recipe Bitterness, Recipe Color, Estimated FG, Alcohol by Volume and Alcohol by Weight labels in the Characteristics frame
- [___] Verify that the Characteristics frame displays style information in normal text, and recipe information in bold text

### Grains

- [___] Verify that selecting the Grains tab changes the ingredients section to controls for grain ingredients
- [___] Verify that the combobox for the Grain field contains a list of grains corresponding to those in the `qbrewdata` database
- [___] Verify that the edit field of the Grain combobox can be edited by the user
- [___] Verify that the Quantity spinbox has the suffix of "lb" by default, and ranges from 0.00 to 1000.00 in increments of 0.25
- [___] Verify that the Extract spinbox ranges from 1.000 to 1.100 in increments of 0.001
- [___] Verify that the Color spinbox ranges from 0.0 to 500.0 in increments of 1.0, and has a suffix of a degree sign.
- [___] Verify that the Type field combobox has the entries of Grain, Extract, Adjunct, Sugar and Other, and that the combobox is not user editable.
- [___] Verify that the Use combobox has the entries of "extract", "mashed", "steeped" and "other", and that the combobox edit field is not user editable
- [___] Verify that setting the Grain field of an entry to blank removes the grain from the list
- [___] Verify that using the [+] and [-] buttons will add or remove a grain from the list

### Hops

- [___] Verify that selecting the Hops tab changes the ingredients section to controls for hop ingredients
- [___] Verify that the combobox for the Hop field contains a list of hops corresponding to those in the `qbrewdata` database
- [___] Verify that the edit field of the Hop combobox can be edited by the user
- [___] Verify that the Quantity spinbox has the suffix of "oz" by default, and ranges from 0.00 to 1000.00 in increments of 0.25
- [___] Verify that the Type combobox includes the entries of "Pellet", "Plug" and "Whole" by default, and that the edit field of the combox is user editable
- [___] Verify that the Alpha spinbox has a suffix of "%", and ranges from 0.0 to 50.0 in increments of 0.1
- [___] Verify that the Time spinbox has a suffix of "min", and ranges from 0 to 120 in increments of 5
- [___] Verify that setting the Hop field of an entry to blank removes the hop from the list
- [___] Verify that using the [+] and [-] buttons will add or remove a hop from the list

### Miscellaneous

- [___] Verify that selecting the Miscellaneous tab changes the ingredients section to controls for miscellaneous ingredients
- [___] Verify that the combobox for the Misc field contains a list of ingredients corresponding to those in the `qbrewdata` database
- [___] Verify that the edit field of the Misc combobox can be edited by the user
- [___] Verify that the Quantity spinbox has the suffix of "unit" by default, and ranges from 0.00 to 1000.00 in increments of 0.25
- [___] Verify that the Notes editbox is editable by the user
- [___] Verify that setting the Misc field of an entry to blank removes the ingredient from the list
- [___] Verify that using the [+] and [-] buttons will add or remove an ingredient from the list

### Notes

- [___] Verify that the Recipe Notes edit box can be edited with user text
- [___] Verify that the Recipe Notes are initially empty on a new file, upon started the application and upon selecting a new recipe after the notes have been modified
- [___] Verify that the Recipe Notes can be saved with a recipe, and restored upon opening a recipe
- [___] Verify that the Batch Notes edit box can be edited with user text
- [___] Verify that the Batch Notes are initially empty on a new file, upon started the application and upon selecting a new recipe after the notes have been modified
- [___] Verify that the Batch Notes can be saved with a recipe, and restored upon opening a recipe

### Calculations

Using the indicated files, verify the following values in the Characteristics frame:

- [___] Verify with a `qbrewdata` file from version 0.3.0, that the DATA_PREVIOUS in `resource.h` value is still valid.
- [___] Verify with the `paleale.qbrew` recipe, that changing the recipe Size to 10.0 results in a Gravity of 1.029, Bitterness of 26, Color of 8 without the Use Morey checked (6 with), Estimated FG of 1.007, Alcohol by Volume of 2.8 and Alcohol by Weight of 2.2
- [___] Verify with the `stout.qbrew` recipe, that changing the Mash efficiency to 83 results in a Gravity of 1.078, Bitterness of 80, Estimated FG of 1.019, Alcohol by Volume of 7.5, and Alcohol by Weight of 5.9, and that Color has not changed
- [___] Verify with the `paleale.qbrew` recipe, that changing the Extract of the Light malt extract to 1.044 results in a Gravity of 1.09, Bitterness of 47, and that Color has not changed
- [___] Verify with the `stout.qbrew` recipe, that changing the Use of the British chocolate malt to "steeped" results in a Gravity of 1.067, Bitterness of 84, and that Color has not changed
- [___] Verify with the `paleale.qbrew` recipe, that adding 5 minutes to each hop Time results in a Bitterness of 59 without the Use Tinseth checked, 56 with the Use Tinseth checked, and that Gravity and Color have not changed
- [___] Verify with the `stout.qbrew` recipe, that changing the Alpha for all hops to 9.6 results in a Bitterness of 86 without the Use Tinseth checked, 72 with the Use Tinseth checked, and that Gravity and Color have not changed
- [___] Verify with either recipe, that any changes to Miscellaneous ingredients do not change any recipe characteristics

Without changing any default values, create a new recipe with the 7.0 pounds of mashed British two-row (1.038 extract, 2.5 color), 1 pound of steeped CaraMunich (1.033 extract, 75.0 color), 1 ounce of pellet Tettnanger (3.7 alpha) at 60 minutes, 0.5 ounces of whole Saaz (3.5 alpha) at 10 minutes, and 1 unit of Lager yeast

- [___] Verify that this recipe results in a Gravity of 1.043, Bitterness of 17 without Use Tinseth checked (16 with), Color of 12 without Use Morey checked (11 with), Estimated FG of 1.011, Alcohol by Volume of 4.2 and Alcohol by Weight of 3.3

Using the Hydrometer Tool, verify the following:

- [___] Verify that entering a Sample temperature of 212.0, a Calibrated temperature of 32.0, and a Hydrometer reading of 1.100 results in a Corrected reading of 1.148
- [___] Verify that entering a Sample temperature of 32.0, a Calibrated temperature of 212.0, and a Hydrometer reading of 1.000 results in a Corrected reading of 0.96
- [___] Verify that entering a Sample temperature of 80.0, a Calibrated temperature of 60.0, and a Hydrometer reading of 1.065 results in a Corrected reading of 1.067
- [___] Verify that entering a Sample temperature of 85.2, a Calibrated temperature of 68.0, and a Hydrometer reading of 1.077 results in a Corrected reading of 1.080

Set the configuration to Metric units, batch size of 15 liters, and enter the following ingredients into a new recipe: mashed, American two-row 4.0kg 1.037 extract 1.8 color, Columbus hops 10g pellet 15.4 alpha 60 time.

- [___] Verify that the Recipe Gravity is 1.062, the Recipe Bitterness is 27, the Recipe Color is 4, the ABV is 6.0 and the ABW is 4.7
- [___] Verify that entering into the Alcohol tool an Original gravity of 1.058 and a Final gravity of 1.012 results in an ABV of 5.9% and ABW of 4.7%
- [___] Verify that entering into the Alcohol tool an Original gravity of 1.070 and a Final gravity of 1.018 results in an ABV of 6.7% and ABW of 5.3%

## Documentation

- [___] Verify that the user manual available under the Help->Contents... contains correct version and copyright dates.
- [___] Verify that window titles for all online documentation are formatted correctly. Errors can arise form newlines and nbsp tags.
- [___] Verify that The Menus sections of the user manual contain all available menu commands, with no unavailable commands
- [___] Verify that the Using QBrew sections of the user manual are an accurate portrayal of the QBrew application
- [___] Verify that the primer available under the Help->Primer... contains correct copyright dates.
- [___] Verify that the information presented in the primer is not dependant upon the use of the QBrew application
- [___] Verify that the `ChangeLog` and `README` files have the correct version and copyright dates
- [___] Verify that the html documentation is viewable in a variety of browsers. Using the `Konqueror` validation tool, or similar, validate the html.
- [___] Verify that miscellaneous documentation contained in the `win` and `mac` directories are up to date and accurate.

## Miscellaneous

- [___] Verify that the text file created with the File->Export... command using the text format, is well formatted within the limitations of plain text
- [___] Verify that the HTML file created with the File->Export... command using the HTML format, is well formatted. Use `tidy` for verification
- [___] Verify that all controls (other than labels) have What's This help available
- [___] Verify by using `ldd` or a similar command or method, that the requirements for QBrew are limited to POSIX, X11 and Qt (and the requirements for those libraries)
- [___] Verify that the default file extension for recipe files is "`qbrew`"
- [___] Verify that the default application configuration file on Unix is `~/.config/usermode/qbrew.conf`, and that the system registry or preferences facility is used under Windows or Macintosh.
- [___] Verify that if a file by the name of `.qbrewdata` is present in the user's home directory, that the data in this file will be used instead of the defaults
- [___] Verify that the following files are installed by default to `/usr/local/share/qbrew`: `qbrewdata`, `splash.png`, and any available translations
- [___] Verify that all files under `/usr/local/share/doc/qbrew` with the prefix of `handbook-` form a complete user manual navigable with "Prev" and "Next" links
- [___] Verify the existance of `LICENSE`,and `README`, files under `/usr/local/share/doc/qbrew`
- [___] Verify that using the instructions given in the `INSTALL` file, that QBrew can be built and executed on a variety of Unix and unix-like operating system
- [___] Verify that the ui files in the source directory have Qt versions of 4.0.
- [___] Verify that the correct list of contributors is contained in the About dialog and the documentation