Back to Blog
Blog

What Is Software Testing? Definition, Types, Levels and Process

What is software testing? A clear definition, the four testing levels, the main test types, manual vs automated testing, and real test code examples.

Written by
Yuvan Sundrani
Read time
8 min read
Published
What Is Software Testing? Definition, Types, Levels and Process

Software testing is the process of evaluating a software application, and the requirements and designs behind it, to find defects and confirm that it behaves as specified and serves its users' needs. In practice, that means running code against defined expectations and reporting every gap between intended and actual behaviour.

Most teams first meet testing as a gate at the end of a sprint: code goes in, a pass or fail comes out. That view explains why so many defects reach production, because a gate checks only what someone thought to check, at the moment they checked it. Effective software testing works more like a feedback loop that runs from the first requirements review to monitoring in production.

This guide covers why testing carries real economic weight, the four testing levels, the main test types, how manual and automated testing divide the work, and what a working test looks like in code.

Key Takeaways

  • A 2002 NIST study put the annual cost of gaps in software testing infrastructure to the US economy at $59.5 billion.
  • The four classic testing levels are unit, integration, system and acceptance testing, each owned by a different role.
  • Test types describe what quality a test checks, from functional correctness to performance, security and usability.
  • Automate checks you run often with stable expected results, and keep human testers on exploratory and usability work.
  • Frameworks such as pytest and Playwright Test turn repeatable checks into code that runs on every commit.

Why Software Testing Matters

The cost argument for testing has a well documented anchor. In June 2002, the US National Institute of Standards and Technology published The Economic Impacts of Inadequate Infrastructure for Software Testing. The report put the annual cost of gaps in testing infrastructure to the US economy at $59.5 billion, and estimated that feasible improvements could deliver an annual benefit of $22.2 billion.

__wf_reserved_inherit

‍

The same report noted that over half of software bugs were found "downstream" in development, and that finding and correcting defects represented approximately 80 percent of development costs. A defect caught in a requirements review costs a conversation. The same defect caught by a customer costs a support ticket, a hotfix, a release and some measure of trust.

Beyond cost, testing gives a team three things:

  1. Lower risk in high-impact areas such as payments, sign-in and data storage.
  2. Evidence for release decisions, so a product owner ships on facts rather than hope.
  3. Confidence to change code, because a reliable regression suite surfaces a broken behaviour within minutes.

Errors, Defects and Failures

Precise vocabulary leads to clearer bug reports. Three related terms describe how a problem travels from a person's head to a user's screen:

TermMeaningExample
ErrorA human mistake that introduces a defectA developer reads "10 percent discount" as 1 percent
Defect (bug)A flaw in code or a requirementThe function multiplies by 0.01 where it should use 0.10
FailureVisible wrong behaviour at runtimeA customer sees $198 at checkout where $180 was expected

A defect can sit quietly in code for months until a specific input triggers a failure. Testing exposes failures, and debugging traces each one back to its defect.

The Four Levels of Software Testing

A testing level is a group of test activities aimed at software at one stage of development. Most teams work with four:

LevelWhat it checksTypical ownerExample tools
Unit testingOne function, class or module in isolationDeveloperspytest, JUnit, Jest
Integration testingHow components and services work togetherDevelopers, QA engineersTest frameworks plus API tests
System testingThe complete application against its requirementsQA engineersPlaywright, Selenium, Appium
Acceptance testingFitness for real users and the businessProduct owners, usersUAT sessions, BDD scenarios

Unit tests run in milliseconds and point at the exact function at fault, so teams write the most of them. Integration testingthen checks the seams between parts. System tests exercise full user journeys end to end, which makes them slower and more fragile, and acceptance testing is the final gate before release. The testing pyramid explains how to balance all four.

__wf_reserved_inherit

‍

Types of Software Testing

Levels describe where a test operates. Types describe what quality it evaluates, and most types apply at every level.

Test typeQuestion it answersExample
FunctionalDoes each feature produce the correct output?Login succeeds with valid credentials
PerformanceDoes it stay fast under load?Checkout responds in 300 ms with 5,000 users
SecurityDoes it resist attacks and protect data?Session tokens expire after sign-out
UsabilityCan real users reach their goals easily?New users finish onboarding in 2 minutes
CompatibilityDoes it work across browsers and devices?Checkout passes on Chrome, Safari, Android and iOS
RegressionDid a change break something that used to work?The full order suite passes after a redesign

Two techniques shape how testers design cases for any of these types. Black-box testing works from the specification alone, using methods such as boundary value analysis. White-box testing works from the code structure and measures statement and branch coverage.

Manual vs Automated Testing

Every test starts as an idea a person writes down. The question is whether a person or a script runs it afterwards.

DimensionManual testingAutomated testing
Best forExploratory, usability and one-off checksRegression, smoke and data-driven checks
Speed per runMinutes to hoursSeconds to minutes
Upfront costLowHigher, since scripts take time to write
Cost per repeat runConstant, each run needs a personClose to zero once stable
JudgementStrong, a tester spots anything oddLimited to the assertions in the script

A useful rule: automate a test when you will run it many times and its expected result is stable. Keep it manual when it depends on human judgement, such as whether an onboarding flow feels clear.

What a Software Test Looks Like in Code

Automated tests are ordinary code that calls the system and asserts on the result. Here are the two ends of the pyramid.

A unit test with pytest

The pytest documentation shows that a plain Python assert is enough to check an expectation, and that pytest automatically collects files named test_*.py.

# test_pricing.py
import pytest
from pricing import apply_discount


def test_ten_percent_discount():
   assert apply_discount(200.0, percent=10) == 180.0


def test_discount_above_100_percent_raises_error():
   with pytest.raises(ValueError):
       apply_discount(200.0, percent=120)
python

If the 1 percent misreading from the earlier example ever shipped, the first test would fail at once and name the exact function at fault.

An end-to-end test with Playwright

Playwright Test is an end-to-end framework that runs on Chromium, WebKit and Firefox.

// tests/cart.spec.ts
import { test, expect } from '@playwright/test';

test('shopper can add a product to the cart', async ({ page }) => {
 await page.goto('https://shop.example.com/products/blue-mug');
 await page.getByRole('button', { name: 'Add to cart' }).click();
 await expect(page.getByTestId('cart-count')).toHaveText('1');
});
typescript

Before each click, Playwright auto-waits until the element is visible, stable, able to receive events and enabled. This one test still touches the web server, the product page, the cart service and the browser together, which is why end-to-end suites need more upkeep than unit suites. Teams that ship on mobile and web often want one flow across every surface, which is what our platform is built for.

The Software Testing Process

Testing follows a repeatable cycle, whether a team works in sprints or long phases:

  1. Plan the scope, risks, environments and exit criteria.
  2. Analyse requirements and user stories to decide what to test.
  3. Design concrete test cases with inputs and expected results.
  4. Prepare test data, environments and automated scripts.
  5. Execute the tests and log every difference as a defect.
  6. Close the cycle with a results summary and lessons learned.

Our article on the six phases of the STLC maps each phase to its entry and exit criteria.

Conclusion

Software testing is a feedback loop that runs across the whole lifecycle, from requirement reviews to production. The NIST figures show why it matters: defects found late cost far more than defects found early.

A practical starting point looks like this. Write fast unit tests for your business logic, add integration tests at service boundaries, and automate a small set of end-to-end tests for the journeys that earn you money. Keep skilled testers on exploration and usability, where human judgement wins. Then review the suite every release, retiring tests that have stopped earning their place and adding tests where defects cluster.

Teams that master these fundamentals get far more value from every tool they adopt, whether that is pytest, Playwright or an AI testing agent.

__wf_reserved_inherit

FAQs

What is software testing in simple words?

Checking that software does what it should, by comparing its actual behaviour with the expected behaviour.

What are the main types of software testing?

Functional, performance, security, usability, compatibility and regression testing, each checking a different quality of the software.

What are the four levels of software testing?

Unit, integration, system and acceptance testing, moving from single functions up to the complete product.

What is the difference between manual and automated testing?

A person runs manual tests and judges results, while scripts run automated tests and check coded assertions.

Is QA the same as software testing?

QA improves the process that builds software, while testing evaluates the product itself for defects.

Which tools are used for software testing?

Common choices include pytest and JUnit for unit tests, Playwright and Selenium for web, and Appium for mobile.

‍

Fix bugs, not tests.

Talk to an expert.

Book 30 minutes with our team. We'll show you BugRadar running on your app.

Start building.

Describe a user journey and watch an agent run it on iOS, Android, and web.

Try for free