Management Function Testing


Links to Functions in Document:


Summary:

Testing of the following functions will be performed according to a top down procedure as indicated by the structure chart created previous to this documented. Unit testing will be performed individually on each module based on the tests below. When each module has been thoroughly tested through integration tested each module will be combined together.


FUNCTION: Add New Room (adds a new room to the database)

  1. Purpose: Enter correct inputs
    Inputs: 1 for room number; single for room type
    Expected Outputs: Should add record to Room Data Store and report successful message.

  2. Purpose: Enter an already existing room
    Inputs: 4
    Expected Outputs: Report error message stating room already exists.

  3. Purpose: Enter negative value
    Inputs: -500
    Expected Outputs: Report error message stating room # is invalid.

  4. Purpose: Enter maximum value
    Inputs: 1038947
    Expected Outputs: Report error message stating room # is invalid.

  5. Purpose: Enter incorrect room type
    Inputs: Suite
    Expected Outputs: Report error message stating room type doesn't exist.

  6. Purpose: Enter a strange character value for Room Number
    Inputs: ajdkf893
    Expected Outputs: Report error message stating room # is invalid.


FUNCTION: Delete Room (removes a room from database)

  1. Purpose: Enter Correct Input
    Inputs: 1
    Expected Outputs: Confirm this request, then delete record from Room Data Store.

  2. Purpose: Room doesn't exist
    Inputs: 350
    Expected Outputs: Report error message stating room doesn't exist.

  3. Purpose: Negative room number
    Inputs: as previous function
    Expected Outputs: Report error message stating invalid room #.

  4. Purpose: Maximum room number
    Inputs: as previous function
    Expected Outputs: Report error message stating invalid room #.

  5. Purpose: Room currently booked
    Inputs: Room currently taken
    Expected Outputs: Report error message stating room is book and by whom.


FUNCTION: Add Room Type (adds a new type ie deluxe)

  1. Purpose: Enter correct inputs.
    Inputs: Suite as room type; 450.00 as room rate;
    Expected Outputs: Report message stating record has been added to Room Type Data Store

  2. Purpose: Enter room type which exists
    Inputs: Deluxe
    Expected Outputs: Report error message stating room type already exists.

  3. Purpose: Enter negative room rate
    Inputs: -583.58
    Expected Outputs: Report error message stating invalid room rate.

  4. Purpose: Enter strange characters (syntactical)
    Inputs: dfasfad
    Expected Outputs: Report error message stating invalid room type.


FUNCTION: Delete Room Type

  1. Purpose: Enter correct data
    Inputs: Deluxe
    Expected Outputs: Confirm first, then report message stating record was removed from Room Type Data Store.

  2. Purpose: Enter room type that doesn't exist
    Inputs: Suite
    Expected Outputs: Report error message stating room type doesn't exist.

  3. Purpose: Enter room type with rooms still existent
    Inputs: Deluxe
    Expected Outputs: Report error message stating rooms of this type are still in database so type can no be removed.


FUNCTION: Modify Room Type (this means basically change the fees info)

  1. Purpose: Enter correct data
    Inputs: Deluxe for room type; 450.00 for room rate;
    Expected Outputs: Report message stating record has been modified correctly.

  2. Purpose: Enter room type that doesn't exist
    Inputs: Suite
    Expected Outputs: Report error message stating room type doesn't exist.

  3. Purpose: Enter a negative room rate
    Inputs: -493.38
    Expected Outputs: Report error message stating room rate is invalid.


FUNCTION: Modify Room (means to modify the type that room was given)

  1. Purpose: Enter correct data
    Inputs: 2 as the room number; single as the room type
    Expected Outputs: Report message stating room information was updated.

  2. Purpose: Enter non-existent room
    Inputs: 473
    Expected Outputs: Report error message stating room number doesn't exist.

  3. Purpose: Enter negative value for room number
    Inputs: -37
    Expected Outputs: Report error message stating room number was invalid.

  4. Purpose: Enter non-existent room type
    Inputs: Suite
    Expected Outputs: Report error message stating room type doesn't exist.


FUNCTION: Add New Credit Card Type

  1. Purpose: Enter correct data
    Inputs: SuperGoldCard
    Expected Outputs: Report message stating record has been added to Credit Card Data Store.

  2. Purpose: Enter already existent credit card type
    Inputs: Mastercard
    Expected Outputs: Report error message stating credit card type already exists.


FUNCTION: Delete Credit Card Type

  1. Purpose: Enter correct data
    Inputs: Mastercard
    Expected Outputs: Confirm first, and then remove record from Credit Card Data Store.

  2. Purpose: Remove non-existent credit card type
    Inputs: Tottenhams Cool Card
    Expected Outputs: Report error message stating credit card type doesn't exist.


FUNCTION: Modify Tax Rate

  1. Purpose: Enter correct data
    Inputs: 5%
    Expected Outputs: Report message stating tax rate has been modified.

  2. Purpose: Syntactically incorrect tax rate
    Inputs: hi there
    Expected Outputs: Report error message stating tax rate is invalid.

  3. Purpose: Over 100%
    Inputs: 101%
    Expected Outputs: Report error message stating tax rate is over 100%.

  4. Purpose: Negative value for rate
    Inputs: -47%
    Expected Outputs: Report error message stating tax rate is invalid.


FUNCTION: Modify GST RATE

  1. Purpose: Enter correct data
    Inputs: 6%
    Expected Outputs: Report message stating GST rate was modified.

  2. Purpose: Syntactically incorrect GST RATE
    Inputs: hi there
    Expected Outputs: Report error message stating GST rate is invalid.

  3. Purpose: Over 100%
    Inputs: 101%
    Expected Outputs: Report error message stating GST rate is over 100%.

  4. Purpose: Negative Value
    Inputs: -47%
    Expected Outputs: Report error message stating GST rate is invalid.


FUNCTION: Add Fee

  1. Purpose: Enter correct data
    Inputs: (item number assigned automatically); XXX_movies for description; $5.00 as fee;
    Expected Outputs: Report message stating record has been added to Fees Data Store.

  2. Purpose: Item Number that already exists
    Inputs: 1
    Expected Outputs: Report error message stating item already exists.

  3. Purpose: Negative Item Number
    Inputs: -475
    Expected Outputs: Report error message stating item number is invalid.

  4. Purpose: Enter negative fee value
    Inputs: -43.66
    Expected Outputs: Report error message stating fee is invalid.


FUNCTION: Delete Fee

  1. Purpose: Enter correct data
    Inputs: 5
    Expected Outputs: Confirm then report message stating fee has been deleted.

  2. Purpose: Item Number doesn't exist
    Inputs: 4839
    Expected Outputs: Report error message stating item number doesn't exist.

  3. Purpose: Negative Item Number
    Inputs: -38
    Expected Outputs: Report error message stating item number is invalid.


FUNCTION: Modify Fee

  1. Purpose: Enter correct data
    Inputs: 4 for item number; $6.00 as fee;,br> Expected Outputs: Report message stating record has been modified.

  2. Purpose: Item Number doesn't exist
    Inputs: 18493
    Expected Outputs: Report error message stating item number doesn't exist.

  3. Purpose: Negative Item Number
    Inputs: -73
    Expected Outputs: Report error message stating item number is invalid.

  4. Purpose: Negative Fee Value
    Inputs: -3784.34
    Expected Outputs: Report error message stating fee value is invalid.

  5. Purpose: Non-numeric Value for fee
    Inputs: fjkds
    Expected Outputs: Report error message stating fee value is invalid.


FUNCTION: Add Employee

  1. Purpose: Enter correct data
    Inputs: John as first name; Smith as last name; 0 as security type; fjd843 as password; (employee ID automatically assigned);
    Expected Outputs: Confirm password, report message stating employee record has been added.

  2. Purpose: Employee ID already exists
    Inputs: *unknown still
    Expected Outputs: Report error message stating employee ID already exists.

  3. Purpose: Employee ID not syntactially correct
    Inputs: 37892md9s
    Expected Outputs: Report error message stating employee ID is not valid.

  4. Purpose: Security type doesn't exist
    Inputs: awesome
    Expected Outputs: Report error message stating security type doesn't exist.

  5. Purpose: Invalid password
    Inputs: jt
    Expected Outputs: Report error message stating password is invalid.

    Should we enforce some sort of law onto length of password, so for instance attempt to enter password less than 5 characters etc.


FUNCTION: Modify Employee

  1. Purpose: Enter correct data
    Inputs: 4 as employee ID; Michael as first name;
    Expected Outputs: Report message stating employee record has been modified

  2. Purpose: Enter nonexistent employee ID
    Inputs: *unknown yet
    Expected Outputs: Report error message stating employee ID doesn't exist.

  3. Purpose: Enter nonexistent security type
    Inputs: awesome
    Expected Outputs: Report error message stating security type doesn't exist.

  4. Purpose: Enter incorrect password format
    Inputs: jt
    Expected Outputs: Report error message stating password is invalid


FUNCTION: Delete Employee

This should be used sparingly since invoices require this information for a period of time. Perhaps we should have a function that notes employee is no longer on staff, but keeps info in database.

  1. Purpose: Enter correct data
    Inputs: 5
    Expected Outputs: Confirm, then report message stating employee has been deleted.

  2. Purpose: Employee ID doesn't exist
    Inputs: *unknown yet
    Expected Outputs: Report error message stating employee ID doesn't exist.


FUNCTION: Add Security Type

  1. Purpose: Enter correct data
    Inputs: 4 as security type; big level as description;
    Expected Outputs: Report message stating record has been added to Security Type Data Store.

  2. Purpose: Security Type already exists
    Inputs: 1
    Expected Outputs: Report error message stating security type already exists.

  3. Purpose: Negative security type
    Inputs: -3
    Expected Outputs: Report error message stating security type is invalid.


FUNCTION: Modify Security Type

  1. Purpose: Enter correct data
    Inputs: 2 as security type; whatever as security description;
    Expected Outputs: Report message stating security level has been modified

  2. Purpose: Security type doesn't exist
    Inputs: 1
    Expected Outputs: Report error message stating security type doesn't exist.

  3. Purpose: Security type is negative
    Inputs: -1
    Expected Outputs: Report error message stating security type is invalid.

  4. Purpose: Enter already used security name
    Inputs: management
    Expected Outputs: Report error message stating security name already exists.


FUNCTION: Delete Security Type

  1. Purpose: Enter correct data
    Inputs: 2 as security level
    Expected Outputs: Confirm, report message stating level has been deleted.

  2. Purpose: Enter nonexistent security type
    Inputs: 4829
    Expected Outputs: Report error message stating security type doesn't exist.

  3. Purpose: Enter security type with employees still registerd
    Inputs: management
    Expected Outputs: Report error message stating security level still contains employees; report list of employee names.