Skip to content
IRC-Coding IRC-Coding
Test Methods Unit Test Integration Test End to End Test Blackbox Testing Whitebox Testing TDD Regression Test Load Test

Test Methods & Classification: Unit, Integration, E2E

Complete guide to test methods: unit, integration, system tests. Blackbox vs whitebox, TDD, and testing strategies explained.

S

schutzgeist

2 min read
Test Methods & Classification: Unit, Integration, E2E

Test Methods and Types

This article is a glossary entry on test methods and their classification – including exam questions and tags.

In a Nutshell

Who tests? – Human (manual) vs. machine (automated), developer vs. user.
What is tested? – Unit (component), integration, system (E2E).
How is it tested? – Bottom‑Up/Top‑Down, static/dynamic, blackbox/whitebox, exploratory.
When is it tested? – Before/after, acceptance.
Why is it tested? – Regression, load/performance, smoke.

Compact Technical Description

Who tests?

  • Developer: Unit, integration, contract, static analysis, TDD
  • QA/Tester: System tests, E2E, exploratory tests, acceptance
  • Machine: Automated regression, load tests, CI pipelines

What is tested?

  • Unit test: isolated class/function
  • Integration test: collaboration of components (DB, network)
  • System/E2E test: complete user flow via UI & infrastructure

How is it tested?

  • Bottom‑Up: small units first, then integration
  • Top‑Down: stubs first, then real components
  • Static: code analysis without execution (lint, security scan)
  • Dynamic: code is executed (unit, integration, E2E)
  • Blackbox: only via interfaces, no knowledge of internals
  • Whitebox: knowledge of internal structure, branch/path coverage
  • Exploratory: experience‑based, unscripted testing

When & Why

  • Before (development phase): TDD, unit, static analysis
  • After: System tests, acceptance, regression
  • Regression: Ensure changes don’t break anything
  • Load/stress: Check behavior under peak load
  • Smoke: quick check that core functions work after deployment

Exam‑Relevant Key Points

  • Test classification (Who, What, How, When, Why) clearly distinguished
  • Unit vs. integration vs. E2E clearly separated
  • Blackbox vs. whitebox applied (examples)
  • Test doubles: stubs vs. mocks
  • Characteristics of good unit tests (correct, isolated, fast, meaningful, maintainable)
  • Test case derivation: equivalence classes, boundary value analysis, branch/path coverage
  • Test process: selection, criteria, data, protocol, evaluation
  • TDD: red‑green‑refactor cycle
  • Regression, load, smoke as typical test types

Core Components

  1. Test classification (Who, What, How, When, Why)
  2. Test levels (unit, integration, system)
  3. Test approaches (bottom‑up, top‑down, blackbox, whitebox)
  4. Test doubles (stub, mock, fake, spy)
  5. Test case derivation (equivalence classes, boundary values, coverage)
  6. Test automation (frameworks, CI, reporting)
  7. Test data management (fixtures, factories, seed)
  8. Test process (planning, execution, evaluation, protocol)
  9. Quality assurance (reviews, audits, metrics)
  10. Tools (test frameworks, mock libraries, CI/CD)

Practical Example (Order Processing)

Unit (Whitebox):
- Class: DiscountService
- Method: calculateDiscount(customer, item)
- Test case: New customer, standard item → expect 0%
- Coverage: all branches (customer type, item type)

Integration (Blackbox):
- Components: service → repository → DB
- Test: save/read an order with real DB container
- Criterion: persisted data = expected data

E2E (Top‑Down):
- Flow: browser → portal → API → DB → message broker
- Scenario: place order, simulate payment
- Expectation: confirmation visible, DB entry, event

Regression (automated):
- Before: order with 5 items, 10% discount → €110
- After: same scenario → must remain €110

Load test:
- Load profile: 500 users simultaneously, 10 s
- Criterion: 95th percentile response time <300 ms, no errors

Smoke:
- After deployment: login, search items, add to cart
- Criterion: all 3 actions successful

Advantages and Disadvantages

Advantages

  • Systematic coverage of risks
  • Early error detection (unit/TDD)
  • Traceable quality (regression tests)
  • Reduced failure costs (load tests)

Disadvantages

  • Effort for test maintenance
  • Flaky tests with unclear dependencies
  • Focus on “numbers” instead of value without clear goals

Typical Exam Questions (with Short Answer)

  1. Blackbox vs. whitebox? Blackbox: only via interfaces; whitebox: knowledge of internal structure.
  2. Unit vs. integration? Unit: isolated; integration: real collaboration of components.
  3. What is TDD? Test‑driven development: red (test fails) → green (test passes) → refactor.
  4. Characteristics of good unit tests? Correct, isolated, fast, meaningful, maintainable, easy to run.
  5. Test case derivation methods? Equivalence classes, boundary value analysis, branch/path coverage.

Most Important Sources

  1. https://martinfowler.com/articles/practical-test-pyramid.html
  2. https://testing.googleblog.com
  3. https://www.istqb.org
Back to Blog
Share:

Related Posts