liveBook · Manning

Smoke test

As explained in Infrastructure as Code, Patterns and Practices: With examples in Python and Terraform

A small, rapid set of tests that checks whether critical functionality remains operational after a change.

A smoke test is a small, rapid end-to-end test that checks whether a change has broken critical business functionality. Run it before slower, broader testing so catastrophic failures are found quickly. section 6.5

Apply smoke tests to operationally important workflows:

  • Check network peering by provisioning a server on each network and verifying connectivity. section 6.5
  • Submit a job to a workload orchestrator and verify that it completes. section 6.5
  • Issue HTTP requests with varying payloads to confirm that upstream services can call the application. section 6.5

Cloud Run deployment check

A pytest fixture can create a GCP Cloud Run service, test its public URL, and delete the service from a testing environment. Against production, test existing active infrastructure instead of creating or deleting resources. section 6.5

How Infrastructure as Code, Patterns and Practices: With examples in Python and Terraform covers it

How deep it goes
Defines the test and gives infrastructure scenarios, but stops short of detailing a complete smoke-test suite.
Examples
Uses Cloud Run URL checks, network connectivity, workload completion, and HTTP requests with varying payloads.
What it assumes
Assumes familiarity with end-to-end testing, deployed infrastructure, public service URLs, and test environments.
What you can do after
Apply it via pytest and infrastructure workflows to detect catastrophic change failures before further testing.
How it connects
Ties smoke testing to end-to-end testing, network peering, workload orchestration, and application deployment.

Also explained in

Compare how 4 books explain smoke test →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Infrastructure as Code, Patterns and Practices: With examples in Python and Terraform. The section links point to the parts of the book it draws on.