V&V Labs
V&V Labs
Validation
Lab Manuals
VII. References
IV. Importance of V &V
Both verification and validation contribute to:
• Early Detection of Errors: Reducing the cost 1. IEEE Std 610.12-1990, IEEE Standard Glossary of
of fixing defects by identifying them early in the Software Engineering Terminology. IEEE, 1990.
process. 2. Boehm, B. W., "Software Engineering Economics,"
• Customer Satisfaction: Validation ensures that Prentice Hall, 1981.
the final product aligns with user expectations. 3. Sommerville, I., Software Engineering, 10th ed.,
• Regulatory Compliance: Ensuring the software Boston: Addison-Wesley, 2015.
meets industry standards, particularly in high-risk 4. Pressman, R. S., Software Engineering: A
domains like healthcare and aerospace. Practitioner's Approach, 8th ed., New York:
McGraw-Hill, 2005.
V. Conclusion 5. IEEE Std 1012-2016, IEEE Standard for System
and Software Verification and Validation, IEEE,
In conclusion, software verification and validation are vital
2016.
processes to ensure the quality and reliability of software
systems. Verification ensures that the software is built 6. Kitchenham, B. A., & Charters, S., "Guidelines for
correctly according to its specifications, while validation Performing Systematic Literature Reviews in
ensures that it meets the actual needs of the users. By Software Engineering," EBSE Technical Report,
employing rigorous verification and validation techniques, 2007.
Lab 2 – Requirements Verification using Checklists (Hospital
Management System)
Reference: Lab 2 template provided by the user. See attached file for pattern.
Sample SRS Extract (Hospital Management System)
This extract contains selected functional requirements for a Hospital Management System (HMS).
1. Patient Registration: The system shall allow staff to register a patient with fields: PatientID,
FullName, DOB, Gender, ContactNumber, Address, EmergencyContact, and InsuranceID.
2. Appointment Booking: The system shall allow patients (or staff) to book an appointment with a
doctor for a specified date and time. The system shall prevent double-booking of the same doctor
slot.
3. Electronic Medical Records (EMR): The system shall store and retrieve patient medical records
including diagnoses, prescriptions, lab results, and treatment history.
4. Prescription Management: The system shall allow doctors to create, edit, and sign electronic
prescriptions; the prescription shall be printable and exportable as PDF.
5. Billing and Invoicing: The system shall generate invoices for services and medicines, calculate
taxes, apply insurance coverage, and mark invoices as Paid/Unpaid.
6. Lab Test Requests: The system shall allow doctors to request lab tests and receive results; lab
results must be linked to the patient record.
2. ✔ ✔ ✔ ✔ Specifi
Appointment es
Booking: The prevent
system shall ion of
allow patients double-
(or staff) to bookin
book an g.
appointment
with a doctor
for a
specified date
and time. The
system shall
prevent
double-
booking of
the same
doctor slot.
3. Electronic Needs
Medical ✔ ✖ ✔ ✔ retentio
Records n
(EMR): The policy
system shall and
store and access
retrieve rules.
patient
medical
records
including
diagnoses,
prescriptions,
lab results,
and treatment
history.
Lab 3
Requirements Validation using Prototyping
Objective:
To confirm and refine software requirements by creating and testing a simple prototype.
Theory:
Prototyping is used to check if the gathered requirements truly meet user needs. It involves making an early version of
the system so users can see and test how it might work. This helps in identifying missing or unclear requirements early,
saving time and cost later in development.
Procedure:
Step 1: Select a Small System
Selected System: Library Management System (LMS)
Step 2: Design a Simple Prototype (Low-Fidelity)
A low-fidelity prototype was created using a simple design tool such as PowerPoint or Figma. It focuses on layout and
basic navigation rather than visuals or animations.
Main Features Validated:
- Librarian login
- Book search by title, author, or ISBN
- Displaying book details and status
- Checking out and checking in books Step 3: Stakeholder Feedback
The prototype was shown to a librarian and a library member. The librarian suggested showing book and
borrower details during check-in and requested an overdue books report. The member suggested having a public
search screen without checkout options.
Expected Result:
The prototype confirmed the basic requirements such as login, search, and book transactions. It also revealed new
needs like a confirmation step for check-ins and an overdue books report. This feedback will help improve the
Software Requirements Specification before development begins.
Questions:
1. What is the difference between low-fidelity and high-fidelity prototypes?
Low-fidelity prototypes are simple sketches or wireframes used to test ideas early, while high-fidelity prototypes look
and behave more like the final product and are used for usability testing.
2. Why is prototyping important in requirement validation?
Prototyping helps clarify unclear requirements, gather user feedback early, and reduce costly changes later. It improves
understanding between developers and users by turning written requirements into visual examples.
Lab 4
Design Test Cases Control and Decision-
Making Statements
Write program and design test cases for the following Control and Decision-Making Statements:
1. For Loop
2. If…Else
3. Switch…Case
4. Do…While
A. Objective
To assess the behavior of software under various conditions by applying control and decision-making
statements, and to design effective test cases that validate program correctness.
2) If…Else
Program: <?php function
checkNumber($x) {
if ($x > 0)
{ return
"Positive"; } else if
($x < 0) { return
"Negative"; } else {
return "Zero";
}
} echo checkNumber(-
5);
?>
Test
Cases:
Test Input Expected Remarks
Case ID Output
TC1 10 Positive Positive number
Test Cases:
Test Case Input Expected Remarks
ID Output
TC1 Monday Start of the week! Valid input
4) Do…While Loop
Program: <?php
function printNumbers($n) {
$counter = 1;
$result = ""; do
{
$result .= $counter . " ";
$counter++; } while
($counter <= $n); return
trim($result);
}
echo printNumbers(5);
?>
Test Cases:
D. Conclusion
By writing programs for control and decision-making statements (for, if…else, switch…case, do…
while) and designing corresponding test cases, we ensured the correctness of program behavior under
different input conditions. This practical strengthened our understanding of program control
structures and systematic software testing.
Lab 5
Design test cases for different tasks (OTP Verification, Image upload, Age
verification in Registration) in any software modules using Equivalence
partitioning, boundary value analysis, and decision table testing
techniques of Black Box Testing.
Black Box Test Cases for OTP Verification, Image Upload, and Age Verification
OTP Verification:
Equivalence Partitioning: OTPs are often required to be a specific length of digits. For example, many
systems accept exactly 6-digit numeric codes[1]. Equivalence classes can be: Valid: exactly 6 digits
(numeric). Invalid: fewer digits, more digits, or non-digit characters. Testing one representative from
each class is sufficient.
Test Case Input Expected Output Remark
(OTP)
Valid 6 123456 OTP accepted (verification Valid case (correct
digits succeeds) format)
Too short 1234 Error: Invalid OTP length Invalid (short length)
Too long 1234567 Error: Invalid OTP length Invalid (long length)
Non- ABC123 Error: Invalid OTP format Invalid (contains
numeric letters)
Empty input "" Error: OTP required Invalid (no input)
Boundary Value Analysis: When OTP must be exactly 6 digits, focus on boundary lengths around 6.
Typical boundary values are 5 and 7 digits (just outside valid) and representative valid values (e.g.
lowest and highest 6-digit). Testing these catches off-by-one errors[2].
Decision Table Testing: We consider combinations of conditions: OTP format and correctness. For
example, conditions can be “OTP format valid (6-digit)” and “OTP matches expected code”. The
decision table enumerates all combinations and expected outputs[3].
Boundary Value Analysis: Suppose the size limit is 1 MB. Key boundary sizes are just below, at, and
just above this limit[2]. Test values around 1 MB check for off-by-one errors in size handling.
Decision Table Testing: Combine conditions (file type and size). For example, “Is format JPEG/PNG?”
and “Is size within limit?” determine the outcome. The decision table ensures all condition
combinations are tested[5].
Decision Table Testing: Add a second condition such as parental consent for minors. For example,
conditions: “Age ≥ 18?” and “Parental consent provided?”. The decision table enumerates
combinations:
Lab 6
GUI Checkpoint For Single Property
Objective
Navigate to W3Schools.
Selenium IDE is a browser-based tool for creating and running automation tests.
You can use it to check single properties of GUI elements. Below is a step-by-step
guide to perform this experiment.
Create a Project:
Open the website where you want to perform the GUI checkpoint
Step 3: Perform the Actions
Click a Button:
On the Tryit Editor page, locate the Run button and click it.
I page has a dropdown list, click the dropdown and select an option
go to [Link]
Here’s how you can perform the test for clicking a button and selecting a list item
using Selenium IDE on W3Schools:
We will:
Navigate to W3Schools.
Step 3: Perform
the Actions
Click a Button:
On the Tryit Editor page, locate the Run button and click it.
If the page has a dropdown list (you can find one on other examples like forms),
click the dropdown and select an option.
Add the command assertElementPresent for an element that appears after the
button is clicked.
Test Results
Specification Description
No.
1 Invoice Creation System must allow creation of new invoices with
accurate customer, product, quantity, and amount
details.
2 Invoice Editing Authorized users can edit existing invoices with audit
trails.
3 Duplicate Invoice System must prevent duplicate invoice numbers.
Prevention
4 Invoice Deletion Authorized users can delete invoices.
5 Invoice Reporting System should generate reports (daily, weekly,
monthly) for analysis.
Identifysystemspecification&designtestcasesforSal
esInvoiceManagement.
SYSTEM SPECIFICATION
Test Cases for Sales Invoice Management System
Test Case ID Test Case Description Test Data Test Steps Expected Actual Status Date Created
Title Result Result By
TC_SIM_001 Verify Invoice Verify if user can Customer: Ali 1. Login 2. System As Pass 05- Sarmad
Creation create new Khan, Product: Navigate to generates Expected Nov-
invoice Laptop, Qty: 2, “Create invoice ID 2025
successfully. Amount: Invoice” 3. and displays
200,000 PKR Enter all confirmatio
required n message.
fields 4.
Click
“Submit”
TC_SIM_002 Verify Invoice Verify that user Invoice ID: 1. Login as System As Pass 05- Sarmad
Editing with edit INV102, New authorized updates Expected Nov-
permission can Qty: 3 user 2. invoice 2025
update invoice Search details and
details. Invoice maintains
INV102 3. change log.
Edit
Quantity 4.
Save
changes
TC_SIM_003 Prevent Ensure duplicate Invoice ID: 1. Create System As Pass 05- Sarmad
Duplicate invoice number INV105 invoice with displays Expected Nov-
Invoice is not allowed. (already exists) existing ID error 2025
Numbers INV105 2. “Duplicate
Submit Invoice ID
not
allowed.”
TC_SIM_004 Verify Invoice Ensure only Invoice ID: 1. Login as System As Pass 05- Sarmad
Deletion authorized users INV109 unauthorized displays Expected Nov-
can delete user 2. Try access 2025
invoices. to delete denied
invoice message.
TC_SIM_005 Verify Invoice Verify that Date Range: 1. Login 2. System As Pass 05- Sarmad
Report reports can be 01-Nov-2025 Navigate to displays Expected Nov-
Generation generated to 05-Nov- Reports 3. accurate 2025
successfully. 2025 Select date report
range 4. summary.
Generate
report
Design Test Cases for Flight Ticket Booking
System
System Specifications
TC_FBS_002 Verify Flight Check if user From: 1. Login 2. Go List of As Pass 05- Sarmad
Search can search Karachi, To: to “Search available Expected Nov-
Function available Dubai, Date: Flights” 3. flights 2025
flights. 10-Nov-2025 Enter criteria displayed.
4. Click
Search
TC_FBS_003 Verify Seat Ensure user Flight ID: 1. Login Confirmation As Pass 05- Sarmad
Reservation can book a EK605, Seat: 2. Search and message with Expected Nov-
flight seat. 12A select flight booking ID 2025
3. Choose seat shown.
4. Confirm
booking
TC_FBS_004 Verify Validate Card: 1234- 1. Proceed to System As Pass 05- Sarmad
Payment secure 5678-9012- payment processes Expected Nov-
Functionality payment 3456, 2. Enter payment and 2025
processing. Amount: details 3. generates e-
75,000 PKR Confirm ticket.
payment
TC_FBS_005 Verify Ensure user Booking ID: 1. Login Booking status As Pass 05- Sarmad
Booking can cancel BK1007 2. Go to “My changes to Expected Nov-
Cancellation booking. Bookings” “Cancelled”. 2025
3. Select
booking
4. Click
“Cancel”
TC_FBS_006 Verify Flight Ensure user Booking ID: 1. Change User receives As Pass 05- Sarmad
Status receives BK1007 flight status in notification via Expected Nov-
Notification notifications. admin panel 2. email/SMS. 2025
Observe
notification
Practical Related Exercise Answers