- Home
- /
- Salesforce Testing
- /
- DevOps Testing
- /
- Quality Gates
Salesforce Quality Gates
Salesforce quality gates are explicit checkpoints where validation results become a pass or fail decision the pipeline enforces, blocking a merge, promotion or release when agreed criteria are not met. A gate defines which checks count, the thresholds for each, how severity is judged, who may override, and what evidence is kept, so the question of whether a change can advance is answered consistently rather than by whoever is on call.
SyntraFlow is designed to supply machine-readable functional results that pipeline gates can act on; this is available for demonstration and proof-of-concept validation.
From test results to enforceable decisions
Most Salesforce teams already produce plenty of signals: deployment check results, Apex test outcomes, code coverage percentages, static analysis findings, functional test runs and UAT sign-offs. Without gates, those signals are advisory. A release manager reads them, weighs them against a deadline, and makes a judgment call that is rarely recorded. Over time the bar drifts, especially under pressure, and failed tests become background noise.
A quality gate turns that judgment into policy. It states that a pull request cannot merge while a critical functional test fails, that a promotion to UAT requires a clean check-only deployment, or that production release requires a passing smoke pack on staging plus an approved change record. The pipeline enforces the rule mechanically, and exceptions go through a defined override with a named approver.
This page covers the design of the gates themselves: criteria, thresholds, placement and governance. What to run on a pull request is on pull request testing, and the pre- and post-deploy checks that often feed a release gate are on deployment validation.
Gate placement across the Salesforce pipeline
Each stage has a different question to answer, so each gate uses different criteria.
| Gate | Question it answers | Typical criteria |
|---|---|---|
| Pull request gate | Is this change safe to merge into the shared branch? | Static analysis with no critical findings, clean check-only deploy, relevant Apex tests pass, focused functional tests pass |
| Integration gate | Do combined changes work together? | Deployment to integration sandbox succeeds, impact-selected regression passes |
| UAT entry gate | Is the environment worth business users' time? | Automated smoke pack passes, test data seeded, known defects listed |
| Release readiness gate | Can this package go to production? | Production validation with RunLocalTests passes, org coverage above policy, full regression passes, UAT signed off |
| Deployment window gate | Should we proceed tonight? | Validated deployment still eligible for quick deploy, no open critical incidents, approvals recorded |
| Post-deployment gate | Keep the release or roll back? | Production-safe smoke pack passes, post-deployment steps verified |
Criteria that make a good Salesforce gate
Gate criteria should be measurable, relevant to the change, and hard to satisfy by accident.
Code coverage with intent
Salesforce requires 75 percent org-wide Apex coverage and some coverage on every trigger for production deploys. Many teams gate on a higher threshold for changed classes rather than chasing an org-wide number.
Functional pass by severity
Tag tests as critical, major or minor by business impact. A critical failure blocks; minor failures may pass with a logged defect.
Access invariants
Rules such as no new Modify All Data or View All grants outside an approved list, checked with permission set testing.
Deployability
A check-only deployment against the target or a production-like org must succeed with the required test level.
Change scope match
The components in the package must match the approved work items, catching unrelated metadata that slipped into a branch.
Evidence present
The gate fails if required evidence, such as a test report or approval record, is missing, not just if tests fail.
Designing a quality gate step by step
Teams introducing gates for the first time get better adoption by building them deliberately rather than switching everything to blocking at once.
Name the decision
Write the single question the gate answers, such as whether a change may enter UAT, and who currently makes that call.
Choose signals and thresholds
Pick the checks that genuinely inform that decision and set thresholds the team can meet today, with a plan to raise them.
Classify tests by severity
Agree with process owners which journeys are critical, for example quote approval or case escalation, so severity reflects business impact.
Run in report-only mode first
Publish gate outcomes without blocking for a few release cycles to find flaky tests and unrealistic thresholds.
Define the override path
Decide who may override, what justification is required, and where the override is recorded before the gate starts blocking.
Switch to enforcing
Make the gate a required check or a mandatory pipeline stage so it cannot be skipped silently.
Review gate health regularly
Track overrides, flaky failures and escaped defects each release, and adjust criteria rather than letting the gate be ignored.
Flaky tests, overrides and gate credibility
A gate is only as credible as its failures. In Salesforce, intermittent failures come from familiar sources: record locking when parallel tests update the same Account, asynchronous Apex or platform events that have not completed when an assertion runs, sandbox performance variance, and tests that depend on data another run changed. If a gate blocks on such failures, teams learn to rerun until green or to override by habit, and the gate stops meaning anything.
The remedy is to treat flakiness as a defect in the test suite. Quarantine a test that fails intermittently out of the blocking set, fix it with isolated data from data reservation or explicit waits for asynchronous work, then return it. Overrides should be rare, justified in writing, approved by someone other than the author, and visible in release evidence. A rising override rate is a signal that thresholds or tests need attention, not that the gate should be removed.
Signs your gates are not working
These patterns suggest gates exist on paper but are not protecting releases.
- Production incidents trace back to changes that passed every gate, because the gate checked Apex coverage but no functional behavior.
- Coverage stays just above 75 percent through test classes that execute code without meaningful assertions.
- The same pipeline stage is marked optional or can be skipped by anyone with admin rights to the CI project.
- Overrides are approved by the change author or granted verbally with no record in the release.
- Changes deployed directly to production through Setup bypass the pipeline and its gates, creating drift found later by configuration drift checks.
- Gate criteria are identical for a text label change and a pricing Flow change, so either low-risk work is slowed or high-risk work is under-tested.
- Nobody can say which tests a release actually passed a month after it shipped.
Risk-based gates for different kinds of change
Gates work better when criteria scale with the risk of the metadata involved, often informed by deployment impact analysis.
Low-risk configuration
Help text, list views or report folder changes may need only a clean deployment check and a smoke run.
Automation changes
Flows, triggers and approval processes require impact-selected functional regression on affected processes before promotion.
Access changes
Profiles, permission sets and sharing rules require access regression for representative personas and a security reviewer approval.
Integration-facing changes
Fields, objects or Apex used by external systems require integration and cross-application testing before release.
How SyntraFlow contributes to quality gates
SyntraFlow is designed to provide the functional and cross-system signal a gate consumes. A pipeline stage can start a SyntraFlow run, receive a machine-readable outcome with per-test severity, and pass or fail the stage accordingly. The run also produces evidence of scope, results and timestamps that can be attached to the change record, so the gate decision is auditable later. Enforcement itself stays in the team's CI service, Git host or DevOps tool, which own required checks, approvals and promotion.
Because the result is tool-neutral, the same gate logic can be applied whether the pipeline runs in GitHub Actions, Azure DevOps, Gearset, Copado or DevOps Center. This approach is available for demonstration and proof-of-concept validation, commonly starting with a report-only gate on one stage before moving to enforcement.
Related pages
Salesforce DevOps Testing
The hub for validation, gates and evidence across the Salesforce pipeline.
Deployment Validation
The pre- and post-deploy checks that feed release and deployment window gates.
Pull Request Testing
What to validate at the first gate a change meets.
CI/CD Testing
How validation stages are arranged in a Salesforce delivery pipeline.
Release Readiness Checklist
A checklist view of the criteria a release gate typically enforces.
Permission Set Testing
Validate the access invariants that security-focused gates check.
Quality Gates testing FAQs
What is a Salesforce quality gate?
It is a checkpoint in the delivery pipeline where defined validation results decide whether a change may advance. If criteria such as a clean check-only deployment, passing critical functional tests or required approvals are not met, the pipeline blocks the merge, promotion or release until they are, or until an approved override is recorded.
Is 75 percent Apex code coverage a sufficient gate?
It is the platform minimum for production deployment, not a quality standard. Coverage measures executed lines, not correct behavior, and it ignores Flows and other declarative automation. Pair a coverage threshold with meaningful assertions and functional tests on the affected business journeys.
Where should quality gates sit in a Salesforce pipeline?
Common placements are the pull request, the integration environment, UAT entry, release readiness, the deployment window and post-deployment. Each gate answers a different question, so criteria should differ by stage rather than repeating the same checks everywhere.
How should overrides be handled?
Define in advance who may override each gate, require a written justification, ensure the approver is not the change author, and record the override with the release evidence. Review override frequency regularly; frequent overrides usually point to flaky tests or unrealistic thresholds.
Should every change face the same gate?
Usually not. Risk-based gates apply lighter criteria to low-risk configuration and stricter criteria to automation, access and integration-facing changes. Impact analysis on the deployed components helps classify each change consistently.
Does SyntraFlow enforce the gate?
Enforcement stays in the CI service, Git host or DevOps tool. SyntraFlow is designed to supply the functional results and evidence the gate evaluates, and this is available for demonstration and proof-of-concept validation.
Make every Salesforce release pass a real gate
See how SyntraFlow is designed to feed functional results and evidence into the quality gates your pipeline enforces.