We use analytics to count visits and form use. It is on unless you reject it. We show no ads on this site.

Glossary

Black box testing

Published . Last updated . Published by Zapple.Tech, founded by the founders of CodeceptJS and Codeception, open-source testing frameworks.

Also called
black-box testing, specification-based testing
Published
Updated
Related service
Functional testing
Definition

Black box testing checks what software does against its specification, without looking at the code. You give it inputs and compare the outputs with what the requirements say. It suits system and acceptance checks and works for outside teams, but it cannot show you which parts of the code no test has run.

What is black box testing, and how does it differ from white box testing?

In black box testing, you design tests from what the software should do, not from how it is built. NIST’s glossary defines it as a method that “examines the functionality of an application without peering into its internal structures or workings”. The ISTQB foundation syllabus adds that the test cases are independent of how the software is implemented, so “if the implementation changes, but the required behavior stays the same, then the test cases are still useful”.

White box testing is the opposite design choice. The same syllabus says it derives tests “from the system’s implementation or internal structure” and aims to cover that structure. Black box asks whether the product does what it should. White box asks how much of the code the tests reached. Neither replaces the other. For the other half, see white box testing.

Black box testing: tests are designed from the specification, inputs go through the software without reading its code, and the outputs are compared with the expected results the specification gives; four techniques pick the inputs

What are the black box testing techniques?

A system has more possible inputs than you can try. A technique is a rule for picking a small set that still catches the likely faults. The syllabus names four. The examples in the table are ours, for illustration.

Technique What it is for A plain example
Equivalence partitioning Splitting inputs into groups the system should treat the same, then testing one value per group A ticket price depends on age: child, adult, senior. Test one age from each band
Boundary value analysis Testing the edges of those groups, because developers “are more likely to make errors with these boundary values” Test the last child age and the first adult age, not only the middle
Decision table testing Requirements where “different combinations of conditions result in different outcomes” A shipping fee depends on country, order total and membership. List each combination
State transition testing Behavior that depends on the sequence of events, modeled as “possible states and valid state transitions” An order moves from placed to paid to shipped. Try shipping an order that is not paid

The syllabus says these techniques sit in a group of their own, separate from white box and experience-based ones. Use case testing is not among the black box techniques in the current foundation syllabus, so the table leaves it out.

When is black box testing enough, and when do you need to look inside the code?

Our rule of thumb: black box is enough when the question is “does it do what we agreed?” That covers acceptance checks, release checks and any product you cannot read the code of, such as a vendor’s system. It also fits tests written the way a user acts. Playwright’s guidance says tests should “verify that the application code works for the end users” and avoid “implementation details such as … the name of a function”. The Selenium documentation describes tools that “emulate user interaction with browsers”. The API side works the same way: Playwright’s API testing guide covers sending requests to your server and checking what comes back.

Add white box when the risk sits in the code, not in the behavior. A black box test suite can be green while a branch of code has never run. If you want to see what a static review can find without running anything, read our page on static testing. For how the two designs work with Selenium, see automated black and white box testing.

What is gray box testing?

NIST’s glossary defines gray box testing as a methodology that “assumes some knowledge of the internal structure and implementation detail” of the thing tested. Our reading: you know the data model or the API contract, but you still test through the interface.

Can an outside team do black box testing well, and what do they need from you?

Yes. In our judgement it is a good fit: the tests start from the specification, so no code access is needed. If you want that run for you, see our functional testing services.

What an outside team needs from you, in our judgement from practice:

  • A specification they can derive expected results from. If a requirement says “fast” or “easy to use”, they will ask or guess. Acceptance criteria with concrete values work better.
  • A stable test environment. A shared environment that changes under them produces failures that are not defects.
  • Test data and accounts. Include the awkward cases: expired, empty, maximum and invalid.
  • A person who answers questions about expected behavior, within a day, not at the end of the sprint.
  • Access to your defect tracker, so findings reach the people who fix them.

Our rule of thumb: the quality of black box testing is capped by the quality of the specification. For how acceptance testing fits in, see what is user acceptance testing.

What does Zapple.Tech do about it?

If you are not sure how well your product is specified or tested from the outside, start with evidence. Zapple.Tech starts with a one-week QA audit of one product area. It looks at its tests, pipeline and release process, and ends in a written report on what is at risk and what to fix first, plus a pilot plan you can run with Zapple.Tech or without it. Read more on the QA audit and assessment page.

Tell us about your product in the form below.

  • User acceptance testing

    User acceptance testing (UAT) is the stage of software development in which the people who will use the software, not the QA team alone, confirm that it meets their business needs and is ready for deployment. It is one form of acceptance testing. UAT validates fitness for use; system testing checks the system against its specification.

  • API testing

    API testing checks a service directly through its interface rather than through a screen. Tests send requests to endpoints and verify responses, business rules, data and access rules. Our API testing services write automated API tests in your repository, covering contracts and back-end rules, and run them in your CI on every change.

  • White box testing

    White box testing designs tests from the internal structure of the code, so you can check that its statements and branches actually run. It suits developers and the code you control. It shows which code no test has touched, but it cannot show that the code does what users need, or that a tested line is tested well.

All terms in the glossary

Test with AI

Functional testing

Functional testing services: each feature checked against its requirements, by automated tests in CI and by testers where judgement counts. One-week audit.

See the service

Questions about black box testing

What is black box testing?

Black box testing derives tests from the specification, not from the code. The tester feeds inputs to the system and checks the outputs against the required behavior. The ISTQB foundation syllabus calls it specification-based and says its main objective is checking the system's behavior against its specifications.

What is the difference between black box and white box testing?

Black box testing designs tests from the specified behavior without reference to the internal structure. White box testing designs them from the code, architecture or data flows, and aims to cover that structure to an acceptable level. Black box asks whether the product does what it should. White box asks whether the tests exercised the code.

What are the black box testing techniques?

The ISTQB foundation syllabus names four black box techniques. They are equivalence partitioning, boundary value analysis, decision table testing and state transition testing. Each helps you pick a small set of test cases from an input space that is too large to test fully.

Is black box testing manual or automated?

Either. Black box describes how the tests are designed, not how they run. A person can run them by hand, or a tool can drive a browser or call an API. Tests that use only what a user can see or an API returns are black box in design, whether or not a person runs them.

What is gray box testing?

Gray box testing sits between the two. NIST's glossary defines it as a test methodology that assumes some knowledge of the internal structure and implementation detail of the thing under test. A tester might know the data model or the API contract while still testing through the interface.

Request a QA audit quote

Tell us what you ship and what worries you.

What happens after you send this

  1. You send the form: your situation and what you need tested, then your name and work email.
  2. Within one business day, we reply with a suggested first step, its scope, timeline and a quote.
  • Fixed scope
  • You decide after each step
  • The tests live in your repository
  • An NDA signed before access

“They helped us to close the positions and consult our team how to proceed further. High-quality quick feedbacks with the deep checking of the required tasks, professional approach, great understanding of the company's technologies and product, detailed reports.”

Kristina Lavrentieva, Manager at keepgo.com, Israel
  • Rated 4.9 out of 5 on Clutch, from 7 client reviews
  • 42 completed test automation and infrastructure projects
  • Founded by the founders of CodeceptJS and Codeception, open-source testing frameworks

Request a QA audit quote

    What is closest to your situation?
    Optional. The product, the platforms, how often you release, what broke last.

    You decide after our reply whether to go ahead.

    Prefer to talk first? Book a call

    One-week QA audit · written report

    Request a QA audit quote