Changes between Version 1 and Version 2 of Testing and Validation


Ignore:
Timestamp:
05/12/26 02:14:36 (2 weeks ago)
Author:
193284
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Testing and Validation

    v1 v2  
    55This section contains SQL scenarios used for testing trigger behavior and advanced database validation.
    66
     7The tests validate booking conflict prevention, RSVP consistency validation, and availability checking functionality implemented during the advanced database development phase.
     8
    79== 1. Venue Booking Conflict Test ==
    810
    9 {{{
     11=== SQL Code ===
     12
     13<syntaxhighlight lang="sql">
    1014INSERT INTO venue_booking(
    1115    "date",
     
    2630    1
    2731);
    28 }}}
     32</syntaxhighlight>
    2933
    30 Expected Result:
    31 The trigger prevents overlapping bookings.
     34=== Expected Result ===
     35
     36The trigger prevents overlapping venue bookings for the same date and time interval.
    3237
    3338== 2. RSVP Validation Test ==
    3439
    35 {{{
     40=== SQL Code ===
     41
     42<syntaxhighlight lang="sql">
    3643INSERT INTO attendance(
    3744    status,
     
    4855    1
    4956);
    50 }}}
     57</syntaxhighlight>
    5158
    52 Expected Result:
     59=== Expected Result ===
     60
    5361Guests who declined RSVP cannot be marked as attending.
     62
     63== 3. Venue Availability Function Test ==
     64
     65=== SQL Code ===
     66
     67<syntaxhighlight lang="sql">
     68SELECT is_venue_available(
     69    1,
     70    '2026-06-20',
     71    '18:00',
     72    '22:00'
     73);
     74</syntaxhighlight>
     75
     76=== Expected Result ===
     77
     78Returns FALSE if the venue already has a conflicting booking.
     79
     80== 4. Photographer Availability Function Test ==
     81
     82=== SQL Code ===
     83
     84<syntaxhighlight lang="sql">
     85SELECT is_photographer_available(
     86    1,
     87    '2026-06-20',
     88    '18:00',
     89    '22:00'
     90);
     91</syntaxhighlight>
     92
     93=== Expected Result ===
     94
     95Returns FALSE if the photographer already has a conflicting booking.
     96
     97== 5. Wedding Financial Summary View Test ==
     98
     99=== SQL Code ===
     100
     101<syntaxhighlight lang="sql">
     102SELECT *
     103FROM vw_wedding_financial_summary;
     104</syntaxhighlight>
     105
     106=== Expected Result ===
     107
     108Displays wedding budget information, total booking expenses, and remaining budget calculations.
     109
     110== 6. RSVP Overview View Test ==
     111
     112=== SQL Code ===
     113
     114<syntaxhighlight lang="sql">
     115SELECT *
     116FROM vw_rsvp_overview;
     117</syntaxhighlight>
     118
     119=== Expected Result ===
     120
     121Displays grouped RSVP statistics for guests and events.
     122
     123== 7. Constraint Validation Test ==
     124
     125=== SQL Code ===
     126
     127<syntaxhighlight lang="sql">
     128INSERT INTO event_rsvp(
     129    guest_id,
     130    event_id,
     131    status
     132)
     133VALUES (
     134    1,
     135    1,
     136    'invalid_status'
     137);
     138</syntaxhighlight>
     139
     140=== Expected Result ===
     141
     142The CHECK constraint rejects invalid RSVP status values.
     143
     144== Summary ==
     145
     146The testing scenarios confirm that the implemented trigger functions, SQL functions, views, and constraints operate correctly and enforce the required business rules inside the PostgreSQL database layer.
     147
     148The validation process demonstrates successful conflict prevention, integrity enforcement, and analytical reporting functionality for the Wedding Planner Management System.