Catalog
method#Quality Assurance#Reliability#Observability

Sanity Testing

Lightweight verification of critical functions after small changes to ensure basic system stability.

Sanity Testing is a lightweight verification practice executed after small code or environment changes to quickly confirm core functionality.
Established
Low

Classification

  • Low
  • Technical
  • Design
  • Intermediate

Technical context

CI/CD systems (e.g., GitHub Actions, GitLab CI, Jenkins)Test frameworks (e.g., Playwright, pytest, JUnit)Observability tools for quick diagnosis

Principles & goals

Focus on critical paths instead of full coverage.Speed over depth: fast feedback is the objective.Automate as much as sensible, but retain manual checks for edge cases.
Build
Team, Domain

Use cases & scenarios

Compromises

  • Relying on sanity tests instead of full regression can leave defects undetected.
  • Flaky or poorly maintained tests cause unnecessary rollbacks and delays.
  • Insufficient coverage of critical areas may give a false sense of safety.
  • Limit tests to truly critical functionality.
  • Integrate sanity tests early in the pipeline (pre-merge or post-build).
  • Automate evaluation and escalation on failures.

I/O & resources

  • Build artifact / container image
  • Minimal set of test data
  • Automated test scripts or checklists
  • Pass/fail status
  • Error logs and initial diagnostic hints
  • Decision recommendation (rollback, release, debug)

Description

Sanity Testing is a lightweight verification practice executed after small code or environment changes to quickly confirm core functionality. It prevents wasting effort on deep regression runs when basic failures exist. Sanity tests are focused, fast, often automatable and typically integrated into CI pipelines to provide rapid feedback to developers and delivery processes.

  • Fast detection of critical issues immediately after changes.
  • Reduction of wasted time on long-running regression tests.
  • Simpler basis for rollback or release decisions.

  • No full quality guarantee; deeper tests remain necessary.
  • Can cause false positives if test data or environments are inconsistent.
  • Not suitable to comprehensively check performance or scalability issues.

  • Sanity suite execution time

    Measures average time required to run the sanity tests.

  • Failure rate per build

    Share of builds where sanity tests fail.

  • Time to first feedback

    Time between build start and availability of sanity test results.

Web API: health and auth checks

Sanity suite checks the health endpoint, basic authentication and DB connectivity after deployment.

Microservice: startup smoke

After container start, core APIs and configuration values are validated to detect startup failures early.

Frontend: basic UI workflows

Automated sanity tests verify that login, navigation and core dialogs are reachable.

1

Identify critical paths and minimal test cases.

2

Implement automated sanity scripts and integrate them into CI jobs.

3

Define clear thresholds and notification processes for failures.

4

Monitor and maintain the suite regularly to reduce flakiness.

⚠️ Technical debt & bottlenecks

  • Outdated test scripts without refactoring.
  • Missing parameterization of test data.
  • Monolithic sanity suites instead of modular checks.
Test data provisioningInfrastructure startup timesFlaky tests
  • Using sanity tests as the sole release gate.
  • Bloating the suite with non-critical checks.
  • Manual sanity checks in CI processes instead of automation.
  • Too broad scope defeats the goal of speed.
  • Lack of maintenance leads to growing brittleness.
  • Unclear ownership for maintenance and response.
Basic test automation skillsUnderstanding of CI/CD pipelinesAbility to perform rapid failure diagnosis
Fast feedback for developersStability verification before expensive testsIntegration into CI/CD pipelines
  • Limited time budget for quick checks
  • Availability of stable test environments
  • Requirement for deterministic test data