Siksha Sarovar

Siksha Sarovar (sikshasarovar.com) is a free educational web application that helps students in India learn programming and prepare for academic and competitive exams. The platform offers structured coding courses (C, C++, Python, Java, HTML, CSS, PHP, Power BI, AI, Machine Learning, Data Science), complete university curriculum notes for BCA/MCA students with previous year question papers, Class 10 and Class 12 CBSE/HBSE school notes, and dedicated preparation material for SSC, UPSC, Banking, Railway and other government exams. Browsing the site is completely free and requires no account. Users may optionally sign in with Google solely to save their learning progress, quiz scores and personal preferences across devices.

Privacy Policy | Terms of Service | Contact Siksha Sarovar | About Siksha Sarovar

v4.0.9 · PWA
Siksha Sarovar logo
Siksha Sarovar
Your Learning Universe

Siksha Sarovar is a free e-learning platform for coding courses, BCA university notes and competitive exam preparation. Optional Google sign-in saves your learning progress across devices.

Initializing knowledge base…
Compiling modules 0%

Unit 2.1: Functional Testing

Lesson 7 of 16 in the free Software Testing notes on Siksha Sarovar, written by Rohit Jangra.

Unit 2.1: Black Box Testing & Techniques

1. Functional Testing (Black Box Testing)

Definition: Black Box Testing (also known as Functional Testing) is a testing method where the internal structure/design/implementation of the item being tested is not known to the tester. The tester interacts with the system solely through the interface (GUI, API inputs).

Why "Black Box"? Imagine a literal black box where you cannot see inside. You put an input (X) into a slot, and you get an output (Y) from another slot. You verify if Y is correct for X, without caring how the box produced Y.

Characteristics:

  • Requires: Requirements and Functional Specifications.
  • Performed by: Independent Testers (QA) or End Users.
  • Focus: Functionality, UX, External behavior.

Advantages:

  • Tester doesn't need to know coding.
  • Testing is done from the user's perspective.
  • Helps expose missing functionality or interface errors.

Disadvantages:

  • Cannot test hidden logic or complex paths inside the code.
  • Redundant test cases might be written if the tester doesn't know how code works.

---

2. Boundary Value Analysis (BVA)

Definition: A technique based on the idea that "errors aggregate at boundaries". Programmers often make "Off-by-one" errors (e.g., using < instead of <=).

Concept: Instead of testing the middle values, we focus on the edges.

Rules for Range [Min, Max]:

  1. Valid Min: (The minimum value allowed).
  2. Valid Max: (The maximum value allowed).
  3. Invalid Min-1: (Just below the minimum).
  4. Invalid Max+1: (Just above the maximum).

Detailed Example:

  • Requirement: An "Age" field accepts values from 18 to 60.
  • Test Case 1 (Min): Enter 18 -> Accept.
  • Test Case 2 (Max): Enter 60 -> Accept.
  • Test Case 3 (Min-1): Enter 17 -> Error Message.
  • Test Case 4 (Max+1): Enter 61 -> Error Message.
  • Note: Software often breaks at 17 or 61 due to boundary conditions.

---

3. Equivalence Class Partitioning (ECP)

Definition: A technique where input data is divided into logical groups called Equivalence Classes. Data elements within one class are expected to be processed in the same way by the software.

Concept: Testing one value from a class is as good as testing all values from that class. This dramatically reduces the number of test cases.

Types of Classes:

  1. Valid Class: Set of inputs that should be accepted.
  2. Invalid Class: Set of inputs that should be rejected.

Detailed Example:

  • Requirement: An application accepts a "Zip Code" which must be a 5-digit number.
  • Partition 1 (Valid): Any 5-digit number (e.g., 10000 to 99999). Test Data: 12345.
  • Partition 2 (Invalid - Length): Less than 5 digits. Test Data: 123.
  • Partition 3 (Invalid - Length): More than 5 digits. Test Data: 123456.
  • Partition 4 (Invalid - Type): Non-numeric characters. Test Data: ABCDE.

---

4. Decision Table Based Testing

Definition: A "Cause-Effect" table used to test systems with complex rules, where the output depends on a combination of inputs. It is excellent for logic verification.

Components:

  1. Conditions (Process inputs): Questions with Yes/No answers.
  2. Actions (Process outputs): What the system should do.
  3. Rules: Columns showing the combination of conditions.

Detailed Example: E-Commerce Discount Logic Rules:

  • "New Users get 10% off."
  • "Orders over $100 get Free Shipping."
  • "Premium Members always get Free Shipping."

Decision Table:

ConditionsRule 1Rule 2Rule 3Rule 4
Is New User?TTFF
Order > $100?TFTF
Action
10% DiscountYesYesNoNo
Free ShippingYesNoYesNo

Benefit: It ensures no combination of rules is missed.