Software testing fundamentals
The types and levels of software testing, from unit tests to end-to-end journeys, and what changes when a coding agent writes the tests.
Start here
What is software testing?
Software testing is running a program, or examining it, to find differences between what it does and what it should do before users find them.
Concepts
What is unit testing?
Unit testing is the practice of checking the smallest testable parts of a program, e.g. a single function, in isolation from the rest of the system.
What is end-to-end testing?
End-to-end testing checks a whole user journey through a running system, from the interface through services and data, the way a real user would.
What is test-driven development (TDD)?
Test-driven development is writing a failing test before the code, then the least code that passes it, then refactoring, in short repeated cycles.
What is a test fixture?
A test fixture is the fixed state a test starts from, e.g. prepared data, which is set up before the test runs and cleaned up after it finishes.
What is a test harness?
A test harness is the code and tools that run tests against a system, with drivers that start it, test doubles for its dependencies, and checks on results.
What is a user journey test?
A user journey test follows one real task a user performs, e.g. signing up, across every screen and service it touches, and checks each step.
What is acceptance testing (UAT)?
Acceptance testing is a test level that checks whether a system meets its acceptance criteria and users' needs, so its owners can decide to accept it.
What is accessibility testing?
Accessibility testing checks whether people with disabilities can use software, combining automated scans with manual checks using assistive technology.
What is agentic testing?
Agentic testing is software testing done by AI agents that choose, run, and judge checks themselves, not agents that only write test scripts for later.
What is API testing?
API testing sends requests straight to an application programming interface and checks each response's status code, data, and errors, with no UI involved.
What is behavior-driven development (BDD)?
Behavior-driven development (BDD) is a practice in which a team agrees on plain Given-When-Then scenarios before coding, and tools run them as tests.
What is boundary value analysis?
Boundary value analysis is a black-box test design technique that tests the lowest and highest values of an input range and the values next to them.
What is contract testing?
Contract testing checks that two services agree on the requests and responses they exchange, without running both services together.
What is exploratory testing, and can an AI agent do it?
Exploratory testing is designing and running tests at the same time, guided by what the tester learns about the software as they use it.
What is integration testing?
Integration testing checks that separately built parts of a system work together, e.g. a service and its database, rather than testing each part alone.
What is QA testing?
QA testing is the testing work a QA team does to check the product itself, while quality assurance improves how a team builds and tests software.
What is regression testing?
Regression testing checks that a change has not broken behavior that worked before, including parts of the software the change did not touch.
What is self-healing test automation?
Self-healing test automation updates a failing test's locators or steps when the interface changes, which cuts upkeep but can also hide real breakage.
What is smoke testing?
Smoke testing is a quick, shallow check that a build starts and its most basic functions work, run before deeper testing is worth the time.
What is snapshot testing?
Snapshot testing saves a program's output once, then fails later runs when the output changes, until someone reviews and accepts the difference.
What is test automation?
Test automation is using software to run tests and compare results without a person doing each step, so checks can repeat on every change.
What is the software testing life cycle (STLC)?
The software testing life cycle (STLC) is the sequence of testing phases in a project, from requirement analysis and planning to execution and closure.
What is the test pyramid, and does it hold for AI-written code?
The test pyramid is a model for a test suite with many fast unit tests at the base, fewer integration tests, and a small number of end-to-end tests on top.
How-to guides
How to test an app before launch
Testing an app before launch without a QA team means running its key workflows on a clean setup, checking accounts and access, and fixing what breaks.
Comparisons
What is the difference between mocks, stubs, and fakes?
Mocks, stubs, and fakes are test doubles, stand-ins for real parts of a system that check calls, return canned answers, or work in a simpler way.
What is the difference between a happy path and an edge case?
The happy path is the expected route through software, an edge case sits at the limit of one input, and a corner case combines several limits at once.
What is the difference between black-box and white-box testing?
Black-box testing checks software from the outside against what it should do, while white-box testing designs tests from the code's internal structure.
What is the difference between performance, load, and stress testing?
Performance testing measures how fast and stable software is, load testing checks it at expected traffic, and stress testing finds where it breaks.
What is the difference between unit, integration and end-to-end tests?
Unit, integration, and end-to-end tests differ in scope, from one part alone to several parts together to the whole system through a real user journey.
Terms in this topic
- Acceptance testing
- Acceptance testing is a level of testing that checks whether a system meets its acceptance criteria and its users' needs. It lets the system's users and owners decide whether to accept it.
- Accessibility testing
- Accessibility testing is testing that checks whether people with disabilities can use software, combining automated scans with manual checks, e.g. with a screen reader or a keyboard alone.
- Agentic testing
- Agentic testing is software testing that AI agents carry out themselves, choosing, running, and judging checks on the software, rather than only writing test scripts for later.
- API testing
- API testing is testing that sends requests straight to an application programming interface and checks each response's status code, data, and errors, without going through a user interface.
- Behavior-driven development (BDD)
- Behavior-driven development (BDD) is a practice in which a team agrees on plain-language Given-When-Then scenarios before coding, and tools run them as tests.
- Boundary value analysis
- Boundary value analysis is a black-box test design technique that tests the lowest and highest values of each input range, and the values next to them, where off-by-one bugs sit.
- Contract testing
- Contract testing is a type of integration testing that checks each side of an interface against a shared contract, the requests a consumer sends and the responses a provider returns, without running both together.
- End-to-end test
- An end-to-end test is a test that follows a whole user journey through a running system, from the interface through services and data, the way a real user would.
- Equivalence partitioning
- Equivalence partitioning is a black-box test design technique that splits inputs into groups the software should treat the same way and tests one value from each group.
- Exit criteria
- Exit criteria are the conditions that must be met to finish a defined testing task or phase, e.g. every planned test has run and no severe defect is open.
- Exploratory testing
- Exploratory testing is a testing approach that designs and runs tests at the same time, guided by what the tester learns about the software while using it.
- Given-When-Then
- Given-When-Then is a scenario format that states a starting state, an action, and an expected outcome in plain language, used in behavior-driven development and acceptance criteria.
- Happy path
- The happy path is the expected route through a feature, with valid input and no errors, that most demos and many generated tests follow.
- Integration test
- An integration test is a test that checks that separate parts of a system work together, e.g. a service and its database, rather than each part alone.
- Load testing
- Load testing is a performance test that runs software under the traffic expected in production, to measure response times and find where it slows down.
- Negative testing
- Negative testing is a testing technique that checks how software handles invalid, unexpected, or missing input, instead of only the input it was designed for.
- Performance testing
- Performance testing is a test type that measures how fast, stable, and efficient software is under a given workload.
- Quality assurance (QA)
- Quality assurance is a set of activities that aims to prevent defects by improving how a team builds and tests software. Testing, a form of quality control, checks the product itself.
- Red-green-refactor
- Red-green-refactor is the test-driven development cycle that writes a failing test, then the code that makes it pass, then cleans up the code while the test stays green.
- Regression testing
- Regression testing is a type of testing that checks that a change has not broken behavior that worked before, including parts of the software the change did not touch.
- Sanity testing
- Sanity testing is a quick, narrow check that a specific fix or change behaves sensibly before deeper testing, often used interchangeably with smoke testing.
- Self-healing test
- A self-healing test is a test that updates its own locators or steps when the app changes, which cuts upkeep but can also hide real breakage.
- Smoke test
- A smoke test is a quick, shallow test that a build starts and its most basic functions work, run before deeper testing is worth the time.
- Snapshot test
- A snapshot test is a test that saves a program's output once and fails when later output differs, until someone reviews and approves the new output.
- Software regression
- A software regression is a defect in which something that worked before a change stops working after it, often in a part of the code the change did not touch.
- Software testing
- Software testing is the practice that runs or examines a program to find differences between what it does and what it should do, before users find them.
- Software testing life cycle (STLC)
- The software testing life cycle (STLC) is the series of phases that testing moves through in a project, from requirement analysis and planning to test execution and closure.
- Stress testing
- Stress testing is a performance test that runs software at or beyond the limits of its expected workload, or with fewer resources, to find how and where it fails.
- System under test
- The system under test is the part of the software that a test exercises and checks, as opposed to the harness around it, including its test doubles.
- Test automation
- Test automation is the use of software to run tests and compare actual results with expected results, so the same checks can repeat without a person doing each step.
- Test charter
- A test charter is a short mission statement for an exploratory testing session that names the area to explore, the risks to look for, and a time box.
- Test double
- A test double is a stand-in for a real component that a test uses in its place. Stubs return canned answers, and mocks also check that they were called as expected.
- Test fixture
- A test fixture is the fixed setup that a test needs before it runs, e.g. seeded data, together with the steps that clean it up.
- Test harness
- A test harness is the set of code and tools that runs tests against a system, including drivers that start it, test doubles for its dependencies, and checks on the results.
- Test pyramid
- The test pyramid is a model of a test suite that has many fast unit tests at the base and fewer integration tests in the middle. A few end-to-end tests sit at the top.
- Test-driven development (TDD)
- Test-driven development is a practice that writes a failing test before the code, then only enough code to pass it, then refactors, in small repeated cycles.
- Unit test
- A unit test is a test that checks the smallest testable part of a program, e.g. one function, in isolation from the rest of the system.
- User journey test
- A user journey test is a test that follows one complete task a user performs, e.g. signing up, from start to finish through the running software, and checks each step.