Functional Testing & Equivalence Class Testing

jadhavshreyashpartur 1 views 19 slides Oct 13, 2025
Slide 1
Slide 1 of 19
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19

About This Presentation

Functional Testing & Equivalence Class Testing


Slide Content

Human resources slide 1 Functional Testing & Equivalence Class Testing. Shreyash Jadhav 23U03036 Harsh Sharma 23U03037

Human resources slide 7 Introduction to Software Testing Software testing is the process of evaluating and verifying that a software application or system works as intended. It involves running the software to identify any bugs, errors, or issues, and ensuring that it meets the specified requirements. Categories of Testing: ✅ Functional Testing Tests what the system does. • Unit Testing • Integration Testing • System Testing • Acceptance Testing ⚙️ Non-Functional Testing Tests how the system behaves. • Performance Testing • Security Testing • Usability Testing • Compatibility Testing Functional Testing & Equivalence Class Testing. Shreyash Jadhav 23U03036 Harsh Sharma 23U03037

Human resources slide 3 Functional Testing (a.k.a. Black Box Testing) Structural Testing (a.k.a. White Box Testing) It focuses on verifying what the system does by testing its functionality. Common Types: • Unit Testing (in some contexts) • Integration Testing • System Testing • Acceptance Testing Example: • Does clicking the "Submit" button send the form correctly? • Does the calculator return the correct result when you press "+"? It requires no knowledge of internal code or logic and is based on requirements or specifications. How it works: Inputs are given → outputs are checked → results are verified. It focuses on how the system is built by tests the internal structure or logic of the code. Common Types: • Code Coverage Testing • Path Testing • Branch Testing • Loop Testing Example: • Are all lines of code executed during the test? • Is every branch in the if-else logic covered? It requires knowledge of code, logic, and structure, developers often perform it. How it works: Tests are written based on control flow, conditions, and branches in the code. FUNCTIONAL VS STRUCTURAL TESTING What is Functional Testing?

Human resources slide 10 What is Functional Testing?

Human resources slide 2 Functional testing is a type of software testing that focuses on verifying that the software works according to its specified requirements or functionality . It tests what the system does, not how it does it. FUNCTIONAL TESTING 🔍 Purpose of Functional Testing: • To ensure that the application behaves correctly for given inputs. • To validate the software against the business requirements. What is Functional Testing?

Example: Login Page We are testing the Login feature of a website to ensure it works according to the given requirements. Requirements: I nput E xpected Output Valid email + password Login successful Invalid email Invalid login credentials Blank email Email required Blank password Password required Explanation: Each test ensures the system works correctly for different inputs based on requirements, without worrying about the internal code. Valid email + password → success Invalid email/password → error Blank fields → appropriate error Functional testing is a type of software testing that focuses on verifying that the software works according to its specified requirements or functionality . It tests what the system does, not how it does it. FUNCTIONAL TESTING 🔍 Purpose of Functional Testing: • To ensure that the application behaves correctly for given inputs. • To validate the software against the business requirements.

Human resources slide 9 Types of Functional Testing: Who performs it? Unit Testing Integration Testing System Testing Acceptance Testing testing individual components (usually by developers) testing how different modules work together testing the entire system as a whole verifying if the system meets business requirements Developers. Developers or testers. QA team End users or clients Types of Integration Testing:

Human resources slide 9 Integration Testing Non Incremental Integration Testing Incremental Integration Testing Types of Integration Testing: Top-Down Approach Testing begins with top-level modules and moves down. Bottom-Up Approach Testing starts from the lowest-level modules and moves up. Sandwich Approach/ Hybrid Integration Testing Combines both top-down and bottom-up testing simultaneously. Big-Bang Approach All modules are integrated and tested together at once. What is Equivalence Class Testing?

Human resources slide 10 What is Equivalence Class Testing?

Human resources slide 2 Equivalence Class Testing (or Equivalence Partitioning ) is a black-box testing technique where input data is divided into equivalence classes or partitions . The idea is that if one test case in a class passes, the others will too, so you only need to test one value from each class. EQUIVALENCE CLASS TESTING Why Use It? • To reduce the number of test cases. • To cover more scenarios efficiently. • Helps identify invalid and valid input ranges. VALID CLASSES inputs your system should accept. INVALID CLASSES inputs your system should accept. STEPS TO DESIGN TEST CASES USING EQUIVALENCE CLASSES

Human resources slide 4 Identify the Input Conditions Break down the inputs for the system or feature you're testing. STEPS TO DESIGN TEST CASES USING EQUIVALENCE CLASSES 1 2 3 Define Equivalence Classes For each input, define: • Valid equivalence classes (acceptable inputs) • Invalid equivalence classes (unacceptable or error-causing inputs) Assign a Unique Test Value from Each Class Choose one representative value from each equivalence class. This keeps tests minimal but effective.

Human resources slide 4 4 5 6 Write Test Cases Create test cases using the selected values, covering each valid and invalid class with at least one test Document Expected Results For each test, clearly state what the expected output or behavior should be. Combine Inputs (Optional) If multiple inputs are involved, combine valid/invalid classes to test different scenarios.

Example Scenario: Let's say we are testing a function that accepts student age for a university admission form. The valid age range is 17 to 25 (inclusive). Class Type Test Case Description Valid Class Age = 20 Typical valid input (within range) Invalid Class 1 Age = 16 Below valid range Invalid Class 2 Age = 30 Above valid range Explanation: We assume Age = 20 represents all values from 17–25. So if this test passes, others like 18, 19, 24 should behave the same. Similarly, Age = 16 and Age = 30 represent their respective invalid ranges. This helps reduce the total number of test cases while still covering the logic properly. ❌ Invalid Classes: Ages less than 17 & greater than 25 ✅ Valid Class: Ages from 17 to 25

Human resources slide 7 Benefits and Limitations of Equivalence Class Testing ✅ Benefits of Equivalence Class Testing 1. Reduces the Number of Test Cases 2. Improves Test Coverage Efficiently 3. Easy to Understand and Implement 4. Helps Catch Input-Related Bugs Early 5. Supports Black-Box Testing ❌ Limitations of Equivalence Class Testing 1. Not Good for Complex Logic 2. May Miss Edge Cases 3. Requires Clear Input Specification 4. Assumes Class Members Behave the Same 5. Doesn’t Consider Combinations of Inputs

Human resources slide 10 CONCLUSION Both testing techniques aim to ensure that the software behaves as expected under various conditions. Functional Testing focuses on verifying the system’s behavior against defined requirements, ensuring all features function correctly from an end-user perspective. Equivalence Class Testing complements functional testing by reducing the number of test cases through effective input classification, maintaining test efficiency and coverage. Together, they help identify functional errors, missing requirements, and input handling issues early in the development cycle. These methods enhance test effectiveness, reduce redundancy, and support the development of robust, reliable software.

Question 1 Which of the following statements about functional testing is true? Functional testing ensures that all code paths are executed at least once Functional testing focuses on the internal structure of the software Functional testing verifies the system's behavior against its requirements Functional testing is mainly performed by developers during unit testing Correct Answer: ✅ C) Functional testing verifies the system's behavior against its requirements.

Question 2 Which of the following best describes the goal of integration testing? To test individual modules in isolation To verify that different modules or components work together correctly To check the system against business requirements To test user interactions with the final product Correct Answer: ✅ B) To verify that different modules or components work together correctly

Question 3 Which of the following is true about Equivalence Class Testing? It divides input data into groups that are likely to exhibit similar behavior It tests all possible input values individually It focuses on internal code structure and logic It is only used for performance testing Correct Answer: ✅ A) It divides input data into groups that are likely to exhibit similar behavior

Human resources slide 10 Thank You