软件测试有多个级别(按范围)和类型(按目的)。理解它们 — unit、integration、end-to-end;functional 与 non-functional — 有助于构建覆盖质量不同方面的完整测试方法。
测试级别(按范围)
UNIT → individual functions/methods in isolation (smallest, fastest, most numerous)
INTEGRATION → multiple units/components working TOGETHER (e.g. code + database, services)
END-TO-END (E2E) → the WHOLE application from the user's perspective (full flows,
through the real UI/system) — broadest, slowest
SYSTEM → the complete integrated system; ACCEPTANCE → meets business requirements
Functional 与 non-functional
FUNCTIONAL → does it do the RIGHT thing? (correct behavior, features work)
→ unit, integration, e2e, smoke, regression, sanity tests
NON-FUNCTIONAL → HOW WELL does it work? (qualities beyond correctness):
PERFORMANCE (speed, load), SECURITY, USABILITY, RELIABILITY, COMPATIBILITY, etc.
