# 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?](https://specstory.com/learning/testing/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.

11 min read

## Concepts

### [What is unit testing?](https://specstory.com/learning/testing/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?](https://specstory.com/learning/testing/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)?](https://specstory.com/learning/testing/test-driven-development)

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 harness?](https://specstory.com/learning/testing/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?](https://specstory.com/learning/testing/user-journey-testing)

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)?](https://specstory.com/learning/testing/acceptance-testing)

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 agentic testing?](https://specstory.com/learning/testing/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 exploratory testing, and can an AI agent do it?](https://specstory.com/learning/testing/exploratory-testing)

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?](https://specstory.com/learning/testing/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?](https://specstory.com/learning/testing/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?](https://specstory.com/learning/testing/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 smoke testing?](https://specstory.com/learning/testing/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?](https://specstory.com/learning/testing/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?](https://specstory.com/learning/testing/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 test pyramid, and does it hold for AI-written code?](https://specstory.com/learning/testing/test-pyramid)

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](https://specstory.com/learning/testing/pre-launch-testing)

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?](https://specstory.com/learning/testing/mocks-vs-stubs)

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 unit, integration and end-to-end tests?](https://specstory.com/learning/testing/unit-vs-integration-vs-e2e-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](https://specstory.com/learning/glossary#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.

**[Agentic testing](https://specstory.com/learning/glossary#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.

**[End-to-end test](https://specstory.com/learning/glossary#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.

**[Exploratory testing](https://specstory.com/learning/glossary#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.

**[Integration test](https://specstory.com/learning/glossary#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.

**[Quality assurance (QA)](https://specstory.com/learning/glossary#quality-assurance)**

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](https://specstory.com/learning/glossary#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](https://specstory.com/learning/glossary#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](https://specstory.com/learning/glossary#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.

**[Smoke test](https://specstory.com/learning/glossary#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](https://specstory.com/learning/glossary#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](https://specstory.com/learning/glossary#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](https://specstory.com/learning/glossary#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.

**[System under test](https://specstory.com/learning/glossary#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](https://specstory.com/learning/glossary#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](https://specstory.com/learning/glossary#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](https://specstory.com/learning/glossary#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 harness](https://specstory.com/learning/glossary#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](https://specstory.com/learning/glossary#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)](https://specstory.com/learning/glossary#test-driven-development)**

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](https://specstory.com/learning/glossary#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](https://specstory.com/learning/glossary#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.

22 terms from the [Learning Center glossary](https://specstory.com/learning/glossary).

---

Source: [Software testing fundamentals | SpecStory](https://specstory.com/learning/testing)
