Automate testing and rollback
Framework question: How do you mitigate deployment risks?
- Risk if not established
- Medium
- Framework verified
- 14 Nov 2026
AWS Well-Architected Framework — OPS06-BP04 Automate testing and rollback
Executive summary
Why this practice matters
Build automated testing and rollback into the deployment pipeline. Tests verify each change before and after it reaches production, monitoring checks success criteria, and the pipeline rolls back automatically when they are not met. Customers are protected from failed changes, and teams can release more often with confidence.
Business impact
- Catches defects before they reach customers.
- Shortens recovery from a failed deployment.
- Lets teams release smaller changes more often.
- Removes error-prone manual steps from deployment and rollback.
Assign
Accountable and responsible roles
Responsibilities are held separately from roles, so accountability type and typical roles are stated explicitly.
| Responsibility | Accountability type | Typical roles |
|---|---|---|
Build tests and rollback into the pipeline Automate tests, success checks and rollback in the deployment pipeline. Typical roles: DevOps Engineer, Software Engineer, DevOps Engineer, Software Engineer | responsible | DevOps EngineerSoftware EngineerDevOps Engineer, Software Engineer |
Define tests and success criteria Decide which tests run at each stage and the criteria for a healthy deployment. Typical roles: Quality Assurance / Test, SRE / Reliability Engineer, Quality Assurance / Test, SRE / Reliability Engineer | responsible | Quality Assurance / TestSRE / Reliability EngineerQuality Assurance / Test, SRE / Reliability Engineer |
Accept release risk Approve the testing approach and any changes that cannot be rolled back automatically. Typical roles: Service Owner, Service Owner | accountable | Service OwnerService Owner |
Assessment
Assessment and evidence state
States describe how far the practice has moved from intent to something continuously validated.
- 0
Not Assessed
No documented evaluation of the practice has been performed.
Indicators
- No one has examined how deployments are tested or rolled back.
- 1
Not Implemented
The practice is absent or applied only ad hoc.
Indicators
- Testing and rollback are manual.
- 2
Partially Implemented
The practice is applied to some workloads or components, with known gaps.
Indicators
- Some tests are automated, but rollback is manual or untested.
- Success criteria are not defined for deployments.
- 3
Implemented
The practice is applied consistently across defined scope, with evidence.
Indicators
- Automated tests and success checks run for every change, with automatic rollback.
- Rollback has been exercised recently.
- 4
Continuously Validated
The practice is regularly tested and improved from measured results.
Indicators
- Change failure and recovery times are tracked and improving.
- Rollback is exercised regularly.
Assessment dimensions
Test automation
Practice-specificAbsent · Partial · Operational and verified
Success criteria
Practice-specificAbsent · Partial · Operational and verified
Automatic rollback
Practice-specificAbsent · Partial · Operational and verified
Rollback testing
Practice-specificAbsent · Partial · Operational and verified
Caution
Do not award maturity because tests exist. Check that they run for every change, that success criteria are checked after deployment, and that rollback is automatic and has been exercised.
Standard
What you should be able to demonstrate
Statements a reviewer should be able to confirm from evidence, not from intent.
- Automated tests run in the pipeline for every change.
- Success criteria are defined for each deployment and checked by monitoring.
- The pipeline rolls back automatically when success criteria are not met.
- Changes are small enough to roll back easily.
- Rollback is tested, not only planned.
Trade-offs to hold in view
- Building and maintaining automated tests takes effort.
- Automatic rollback needs well-chosen criteria to avoid false triggers.
- Some changes, such as data migrations, need special handling to be reversible.
Assess
Questions to ask
Each question exposes the difference between an intention and an operating practice.
- discovery
What happens today when a deployment fails in production, and how long does recovery take?
Exposes manual recovery.
Usually asked by: DevOps Engineer, SRE / Reliability Engineer
- challenge
Which of our changes could not be rolled back quickly, and why?
Finds changes that are too large or irreversible.
Usually asked by: Software Engineer, Architect
- evidence
Can we show a recent deployment that rolled back automatically, and the criteria that triggered it?
Requires a working rollback.
Usually asked by: DevOps Engineer, Quality Assurance / Test
- executive
How much customer impact did failed deployments cause last quarter?
Makes deployment risk decision-ready.
Usually asked by: Service Owner, Technology Executive
Evidence
Required and expected evidence
Reusable evidence definitions held once in the evidence library and referenced by every practice that relies on them. Each links to what good evidence looks like and to worked examples.
Non-Functional Requirements Specification
A structured set of measurable quality-attribute requirements defining how well a workload or service must perform and operate across areas such as reliability, performance, scalability, security, recovery, usability and maintainability.
Shows the success criteria a deployment must meet, such as availability and latency targets.
Minimum expected content
- Quality attribute/category
- Requirement identifier and clear requirement statement
- Business/stakeholder/risk source or rationale
- Measurable target, threshold or acceptance condition where applicable
- Scope, workload component, user journey or operating condition to which the requirement applies
- Measurement/verification method and evidence source
- Priority or criticality
- Owner accountable for the requirement
- Dependencies, assumptions and exceptions
- Traceability to architecture decisions, tests/SLOs/controls and review status
Anti-patterns
- Statements such as 'highly available', 'fast', 'secure' or 'scalable' with no acceptance condition
- Copying generic example thresholds into a workload without rationale
- Using a solution prescription such as a particular database or scaling mechanism as a substitute for the required outcome
- Treating every quality attribute as equally important
- Defining targets with no measurement or test approach
- NFRs captured once during design and never compared with production evidence
- Security/compliance claims represented as NFRs without linking to the relevant control or regulatory evidence
Review: Establish during discovery/design and review whenever business criticality, workload demand, threat/compliance context, service commitments or architecture materially change.
Operational Readiness Review
A structured record showing whether a workload or service is ready to operate safely and reliably, what gaps or conditions remain, who owns them and what decision was made.
Shows that automated testing and rollback were reviewed before go-live.
Minimum expected content
- Workload or service, scope, environment and review date
- Named review owner and participating roles
- Readiness criteria and results across monitoring, incident response, recovery, security, configuration, performance, documentation/training and dependencies
- Identified gaps, exceptions and material risks
- Actions, owners and due dates
- Overall readiness decision or status, including any conditions
- Approval or acceptance record and next review date where applicable
Anti-patterns
- Checklist completed as a documentation exercise with no supporting evidence
- Generic organisation-wide checklist copied without workload-specific acceptance criteria
- All items marked complete despite known unresolved risks
- No distinction between required evidence, reviewer judgement and remediation actions
- A readiness status with no named decision owner
- A historic ORR reused after material architecture, dependency or operating-model change
Review: Before production launch and material operational change; repeat periodically where continuing assurance is required.
Diagnosis
Common evidence gaps
Manual post-deployment testing
Problems are found after customers are affected.
Large releases
Bulk changes are hard to roll back.
Manual rollback
Recovery depends on a series of manual steps under pressure.
Untested rollback
Rollback exists on paper but has never been exercised.
Implementation
Implementation guidance
Define a testing approach
Decide which tests run at each stage, which are automated and which remain manual, based on business value.
Automate tests in the pipeline
Run unit, integration and end-to-end tests automatically, and block promotion on failure.
Define success criteria
Agree the metrics that show a deployment is healthy, such as error rates and latency.
Automate rollback
Configure the pipeline to roll back when success criteria are not met after deployment.
Test the rollback
Exercise rollback regularly so it works when needed.
Measure
Measurements
- Change failure rate
- Time to recover from a failed deployment
- Share of deployments with automated success checks
- Rollbacks tested in the last period
Related
Outcomes and practices
Business outcomes
Practices