intermediate·9 min read·Updated Oct 24, 2026

Shift Left Testing and Shift Right Testing: Where Each Check Belongs

Shift left and shift right aren't rival philosophies. Place each risk where it can first be seen, connect the two with an incident-to-test loop, and keep a scheduled smoke pack as the bridge.

This is lesson 8.3 of AI and Shift-Left Testing Strategy. Lesson 8.2 moved checks as early as they can go; this one decides which checks belong after release.

Shift left testing and shift right testing are a placement decision

Shift left testing and shift right testing answer different questions. Shift left asks "is this change correct?" before release, where a defect costs an edit. Shift right asks "is the running system healthy for real users?" after release, where only production has the traffic, data and configuration that reveal some failures. The useful question is never "left or right?" but "where can this particular risk first be seen?" Place each risk there, then connect the two sides so that what production teaches you moves left.

For the side-by-side comparison table and a latency budget enforced on both sides, read shift left vs shift right testing. This lesson works through placement for a real API.

What is shift left testing and shift right testing?

Shift leftShift right
WhenBefore release: refinement, pull request, stagingAfter release: production or a canary
Question it answersDoes the change do what was agreed?Does the system work for real users, right now?
Typical checksRequirement examples, contract checks, generated API tests, mocksPost-deploy smoke tests, synthetic checks, canaries, observability
Data usedTest data, seeded or generatedReal data, read-only
Cost of a failure found thereAn edit and a re-runAn incident, a rollback, a customer report

Place each risk where it can first be seen

Take six risks for the sandbox store's orders API and ask where each one can first be observed.

RiskEarliest place it showsSide
An order with quantity: 0 is acceptedA negative test on the pull requestLeft
A field is removed from the order responseA breaking-change check on the specLeft
Production is deployed with a missing secret, so every call failsA smoke test right after the deployRight
Responses slow down under the real mix of trafficProduction metrics; a load budget on the left catches part of itBoth
A bug only appears with a real catalogue of 50,000 productsProduction first, then a test with that data shape on the leftRight, then left
A third-party dependency starts timing outA scheduled synthetic check with an alertRight

Two patterns stand out. Anything about the change itself belongs on the left. Anything about the environment, the data at scale or other people's systems can only be seen on the right, and the left side can only learn from it after the fact.

Shift left and shift right testing approaches

On the left: requirement review with examples, contract and breaking-change checks, generated functional, negative and boundary API tests, integration journeys on staging, mock servers for dependencies that aren't ready, and performance and security checks before release.

On the right: a smoke test after every deploy, synthetic checks on a schedule, canary releases that expose a change to a small share of traffic first, feature flags that switch a change off without a deploy, observability (logs, metrics and traces), and controlled chaos experiments with a known blast radius.

A smoke test after deploy is the simplest bridge between the two. It is the same kind of test you write on the left, run against the real environment on the right.

GET/api/v1/products?error=503
Simulate the service failing after a deploy: a smoke test sees the 503 a customer would.
curl -X GET 'https://demo.totalshiftleft.ai/api/v1/products?error=503'

That 503 is what a customer would see if the service came up broken. A smoke test that calls three or four read-only endpoints every few minutes sees it too, usually before the first support ticket.

Shift left and shift right testing practices that connect the sides

  1. Use the same numbers on both sides. If the orders API must answer in under 500 ms, that is the threshold for the pre-release check and for the production alert.
  2. Keep data-changing and heavy tests on the left. In production, run read-only checks only: no creates, no deletes, no load.
  3. Close the loop after every incident. End the review with "which earlier check should have caught this?" and add it. For the missing-secret incident, the answer might be a configuration check in the deploy job, plus the smoke test as the backstop.
  4. Alert a person, not a dashboard. A smoke test that fails silently is a log entry. Send failures to the channel the on-call engineer watches.
  5. Don't mistake synthetic checks for observability. A scheduled test proves a few known paths work. It can't tell you about the requests you didn't think to script, which is what logs, metrics and traces are for.

Common mistakes

  • Treating shift right as testing in production instead of testing before. The right side catches what the left can't see; it is not a place to defer work the left could do.
  • Smoke tests that change data. They pollute production and create noise for the next incident.
  • No owner for the loop. If nobody turns incidents into earlier checks, the two sides drift apart.

In Shift-Left API: a scheduled post-deploy smoke pack

Shift-Left API is a test platform, not an APM or observability tool: it has no real-user monitoring, tracing or log analysis. What it gives the right side is the bridge, a scheduled smoke pack built from the same tests you wrote on the left. Test Run Packs and the test scheduler need Professional, Enterprise or the 15-day trial.

  1. Pick the smoke tests. In a project built from https://demo.totalshiftleft.ai/openapi/rest.json, keep three or four read-only tests: the product list, one product, and one order read with ?expand=user,product.
  2. Build the pack. In Execution, click New Test Run Pack, choose Functional, and name it Store API smoke. Select the tests.
  3. Choose the environment. A pack runs against one environment. Use the project default, or tick Override in step three to point it at the deployed environment.
  4. Set a notification. In step four, send failures to one channel: email, Slack, Microsoft Teams or a webhook.
  5. Schedule it. In step five, set Repeat to every 15 minutes and click Schedule Test Run. Upcoming Schedule shows the next run.
  6. Run it after each deploy too. Add the same pack to the end of your deploy pipeline with the GitHub Action, Azure DevOps task, Jenkins plugin or REST API, so a broken release is caught in minutes, not at the next scheduled run.

Scheduled runs execute on the Shift-Left Engine, so the engine must be able to reach the environment you test. Every run lands in Reporting with its pass rate; lesson 9.12 turns that history into dashboards.

Try it yourself

On a trial, build a pack from three read-only sandbox tests, set Repeat to every 15 minutes on step five, and schedule it. Check Upcoming Schedule, wait for the first run, and find it in Reporting: which execution type does it show?

Recap

  • Shift left testing and shift right testing are a placement decision: put each risk where it can first be seen.
  • Shift left and shift right testing approaches meet at the post-deploy smoke test: a left-side test, run on the right.
  • Shift left and shift right testing practices connect the sides: same thresholds, read-only checks in production, and every incident turned into an earlier check.

Next, in lesson 8.4, you look at where AI fits into API test automation, and what it should never be allowed to change.

Hands-on lab

Try it: On a trial, build a Test Run Pack from three read-only tests on the sandbox (the product list, one product and one order), set Repeat to every 15 minutes on step five, and schedule it.

Enter your email to open the lab steps. One unlock opens every lab in the learning center.

No spam. Protected by reCAPTCHA — Google Privacy & Terms.

Frequently asked questions

What is shift left testing and shift right testing, in one line each?+

Shift left testing moves checks earlier, before release, so defects are found while they are cheap to fix. Shift right testing checks the running system after release, with real traffic, data and infrastructure, to find what no pre-production environment can show. Most teams need both.

Which shift left and shift right testing approaches should a team start with?+

On the left, start with generated API tests and a breaking-change check on every pull request. On the right, start with a read-only smoke test after every deploy and on a short schedule, with an alert on failure. Canary releases, feature flags and chaos experiments come later, once those two are reliable.

What shift left and shift right testing practices connect the two sides?+

Use the same thresholds on both sides, keep anything that changes data or loads the system on the left, and end every production incident by asking which earlier check should have caught it. Then add that check. Over time the left side of the suite becomes a record of what production has taught you.

Related lessons

Read more on the blog