In software engineering, we categorize testing into different types based on what we are trying to verify. While Levels of testing (Unit, System, etc.) tell us when we test, Types tell us the objective of the test.
The two main "super-categories" are Functional and Non-Functional testing.
⚙️ Functional Testing
This focuses on what the system does. It verifies that every function of the software application operates in conformance with the requirement specifications.
Unit Testing: Testing individual components.
Smoke Testing: A quick "pass/fail" test to see if the most vital functions work (e.g., does the app even open?).
Sanity Testing: Done after receiving a software build with minor code changes to verify that the bugs are fixed.
Regression Testing: One of the most important types. It ensures that new code changes haven't broken existing features.
User Acceptance Testing (UAT): Verifying the software works for the end user.
🚀 Non-Functional Testing
This focuses on how the system performs. It checks the "Quality Attributes" of the software that aren't related to specific features but are vital for a good experience.
Performance Testing: Checks how the system behaves under a specific workload.
Load Testing: Testing the system by constantly increasing the load (users/transactions) until it reaches its limit.
Stress Testing: Pushing the system beyond its limits to see how it fails and how it recovers.
Security Testing: Identifying vulnerabilities, threats, and risks in the software.
Usability Testing: Checking how "user-friendly" the application is.
Compatibility Testing: Ensuring the app works on different browsers (Chrome, Safari), OS (iOS, Android), and devices.
🔍 Structural Testing (White Box)
This looks at the internal logic and structure of the code.
Path Testing: Ensuring every possible path through the code has been executed at least once.
Loop Testing: Specifically checking if loops (for, while) behave correctly at their boundaries (0 iterations, 1 iteration, maximum iterations).
🔄 Change-Related Testing
When code is modified, we run specific types of tests to manage the risk of those changes:
Confirmation Testing (Retesting): Running a test that previously failed to "confirm" that the bug is truly fixed.
Regression Testing: Re-running previous tests to make sure the fix didn't break something else.
📊 Summary Table: Functional vs. Non-Functional
Feature | Functional Testing | Non-Functional Testing |
|---|---|---|
Focus | User requirements / Features. | Technical requirements / Performance. |
Question | "Does this feature work?" | "How well does it work?" |
Requirement | Based on the SRS. | Based on Quality Standards. |
Example | Checking if a user can login. | Checking if 10,000 users can login at once. |
💡 Which one is more important?
Neither! A system that is functionally perfect but takes 30 seconds to load a page (bad performance) is a failure. Similarly, a system that is incredibly fast but gives the wrong answer to a math problem (bad functional) is also a failure. You need a balance of both.