Courses 0%
23
Software Testing Fundamentals · Chapter 23 of 42

Functional Testing

Akhil
Akhil Sharma
7 min

✅ Functional Testing: "Does Each Feature Work Correctly?"

Testing that your software actually does what it's supposed to — verifying features against requirements, not implementation details.

What is Functional Testing?

Functional testing verifies that each individual feature works according to requirements, testing ONE thing at a time.

Feature: User Login

Test Cases:

  1. Valid username + valid password → Success ✅

  2. Valid username + wrong password → Error message ✅

  3. Invalid username → Error message ✅

  4. Empty fields → Validation error ✅

  5. Password with special chars → Success ✅

  6. SQL injection attempt → Blocked ✅

Real-World Analogy:

Like testing each appliance in a kitchen separately:

Refrigerator:

✓ Does it cool to 40°F?

✓ Does freezer reach 0°F?

✓ Does ice maker work?

✓ Do shelves hold weight?

Oven:

✓ Does it heat to 350°F?

✓ Does timer work?

✓ Do burners light?

✓ Does auto-shutoff work?

Each appliance tested independently!

Functional Testing Example: Password Reset Feature

Feature Requirements:

  • User enters email

  • System sends reset link

  • Link expires in 24 hours

  • User sets new password

  • Old password no longer works

Test Cases:

TC-001: Valid Email Reset Input: registered@email.com Expected:

✅ Success message displayed

✅ Email sent with reset link

✅ Link works within 24 hours

TC-002: Unregistered Email

Input: notindb@email.com

Expected:

✅ Generic success message (security - don't reveal if email exists)

✅ No email sent

TC-003: Expired Link

Setup: Generate link, wait 25 hours

Expected:

✅ "Link expired" message

✅ Option to request new link

TC-004: Link Used Twice

Setup: Use valid link once Expected:

✅ First use: Password changed ✅

✅ Second use: "Link already used" error

TC-005: Password Requirements

Input: Various passwords

Expected:

✅ "12345" → Rejected (too weak)

✅ "MyP@ssw0rd123" → Accepted

✅ Password must meet complexity rules

Functional vs. Unit Testing:

Unit Testing (Developer perspective):

"Does this function return correct output?"

js

Functional Testing (User perspective):

"Can the user actually reset their password?"

  1. User enters email

  2. Clicks submit

  3. Checks email inbox

  4. Clicks link

  5. Enters new password

  6. Logs in with new password

All steps work from UI → API → Database → Email ✅

Key characteristics:

  • 🎯 Black box: Test from user perspective, not code perspective

  • 📋 Requirements-based: Each test maps to a requirement

  • 🔍 One feature at a time: Isolated testing

  • 📊 Many test cases: Cover positive, negative, edge cases


Key Takeaways

  1. Functional tests verify that features work according to requirements — testing what the system does, not how it does it
  2. Test cases should cover happy paths, edge cases, and error scenarios — don't just test the expected input
  3. Functional tests should be independent and repeatable — each test sets up its own state and cleans up after itself
  4. Automate functional tests in CI/CD — manual testing doesn't scale and misses regressions
Chapter complete!

Course Complete!

You've finished all 42 chapters of

System Design Indermediate

Browse courses
Up next Integration Testing
Continue