#1 India's Top IT Training Institute
×

About Uncodemy

Know more about who we are and what we stand for.

About Us

About Us

Discover our mission to equip individuals with essential IT skills and industry expertise.

Read More →
UnCodeMy Gallery

UnCodeMy Gallery

Explore highlights from our IT training sessions and success stories.

Read More →
Mentors

Mentors

Meet the industry experts who train and guide you through your course.

Read More →
Free Resources

Free Resources

Free tutorials, interview questions, tools and calculators to help you learn.

Explore →
×

Free Resources

Learn, practice and plan your career — bilkul free.

Tutorials

Tutorials

Step-by-step written tutorials to learn any technology at your own pace.

Read More →
Free Counselling

Free Counselling

Book a free video counselling session and pick the right course for you.

Read More →
Online Compiler

Online Compiler

Write, run and test your code online — no setup required.

Read More →
Test Design

Specification Based or Black Box Techniques

What are Specification-Based Techniques?

Specification-based (black box) techniques derive test cases from the requirements, specifications, or functional description of the software, without reference to its internal code structure.

Common Specification-Based Techniques

  • Boundary Value Analysis (BVA): Testing at the edges of input ranges.
  • Equivalence Class Partitioning (ECP): Grouping inputs into classes expected to behave similarly.
  • Decision Table Testing: Testing combinations of conditions and their resulting actions.
  • State Transition Testing: Testing how the system moves between different states.
  • Orthogonal Array Testing: Efficiently testing combinations of multiple input parameters.
  • Use Case Testing: Deriving tests from documented user interactions with the system.

Why Use Black Box Techniques?

These techniques ensure the software meets functional requirements from the end user's perspective and are especially useful when source code isn't available or relevant to the tester.

Applying the Techniques to One Requirement

Consider a simple requirement: "An online form accepts applicants aged 18 to 60. Age must be a whole number." Here is how three techniques turn that sentence into tests.

Equivalence partitioning

Split the inputs into groups that the system should treat the same way:

  • Valid class: 18 to 60, for example 35.
  • Invalid class below range: less than 18, for example 10.
  • Invalid class above range: more than 60, for example 72.
  • Invalid class of wrong type: text or decimals, for example "abc" or 25.5.

One value from each class is enough, because any other value in the same class should behave identically.

Boundary value analysis

Defects cluster at edges, so test just below, on and just above each limit: 17, 18, 19 and 59, 60, 61. Six values give strong coverage of the range logic.

Decision table

Now add a second rule: applicants over 50 need a medical certificate. Conditions combine, so a table makes every case visible.

RuleAge valid?Age over 50?Certificate?Result
R1No--Reject: invalid age
R2YesNo-Accept
R3YesYesYesAccept
R4YesYesNoReject: certificate needed

Each column of rules becomes one test case, and the table itself exposes gaps in the requirement if a combination has no defined result.

State Transition in Practice

State transition testing fits anything with memory of earlier events. A login that locks after three wrong passwords has states such as Ready, One failure, Two failures and Locked. Valid transitions include a correct password from any non-locked state leading to Logged in. The interesting tests are invalid ones: trying the correct password while Locked must still be refused, and the counter must reset after a successful login.

Picking the Right Technique

If the requirement has...Start with
Numeric ranges or length limitsEquivalence partitioning plus boundary values
Several conditions that combineDecision table
Status changes or workflowsState transition
Many parameters with many valuesPairwise or orthogonal arrays
End-to-end user goalsUse case testing

Techniques are usually mixed. A registration feature might use boundaries for the password length, a decision table for discount rules and a use case for the full sign-up journey.

Where Testers Commonly Slip

  • Testing only the valid partition and assuming invalid inputs are handled.
  • Choosing boundary values on one side of the limit only.
  • Building decision tables without collapsing impossible combinations, which wastes effort.
  • Ignoring outputs: partitions apply to results too, such as zero, positive and negative totals.
  • Not tracing each test back to the requirement line it came from.

A useful habit is to write the partitions and boundaries next to the requirement before writing any steps; reviewers can then spot missing classes in seconds.

Ready to master real-world software testing?

Learn manual and automation testing hands-on with mentor-led sessions.

Explore Course