Test pyramid, UAT and smoke testing methodology
How to balance unit, integration and end-to-end tests in a test pyramid, where user acceptance testing and post-deployment smoke tests fit, and how to make automated tests independent, deterministic and focused on business logic.
Given a customer scenario, describe and recommend an appropriate testing methodology.
~8 min read · 13 practice questions ·
What the exam expects
- Recommend a balanced test pyramid and assign each check to its layer: Apex unit tests, Jest, integration tests, a few browser end-to-end tests.
- Place user acceptance testing (UAT) in the release path, plan its preparation and explain what its sign-off means.
- Add post-deployment smoke tests, and explain why a successful deployment does not prove production works.
- Diagnose flaky, order-dependent or low-value tests and recommend the fix: synchronization, independence, testing business logic.
- Choose the environment for each kind of testing, including production behind a feature flag.
Key terms: test pyramid (many fast unit tests, fewer integration tests, few end-to-end tests), integration test (checks that components work together), UAT (end-user testing in a sandbox that confirms what was requested is delivered), smoke test (a quick check of critical flows right after release), feature flag (configuration that keeps deployed code off until enabled).
Key facts
- Detail
- Hundreds of unit, dozens of integration, under 20 E2E tests
- Detail
- No browser, no org; LWC only, not Aura
- Detail
- Coverage doesn't guarantee test effectiveness
- Detail
- Every path including default, boundaries, fault paths, different users
- Detail
- Scratch org per change; Developer sandbox refreshes once a day
- Detail
- Install the build's package version in a sandbox
- Detail
- Full Copy sandbox: complete production data and configuration
- Detail
- End users, in a sandbox, last stage before go-live, formal sign-off
- Detail
- Critical flows, endpoints, key functions right after release
Sources for this section (6)
- DevOps Patternsarchitect.salesforce.com (opens in a new tab)
- Test LWCdeveloper.salesforce.com (opens in a new tab)
- Testing and Code Coveragedeveloper.salesforce.com (opens in a new tab)
- Flow Testinghelp.salesforce.com (opens in a new tab)
- Testing and Continuous Deliverytrailhead.salesforce.com (opens in a new tab)
- Learn About UATtrailhead.salesforce.com (opens in a new tab)
- Why do end-to-end browser tests stay at the top of the pyramid in small numbers?
- When does UAT happen, and who runs it?
- Why are scratch orgs better than Developer sandboxes for CI test runs?
- Which four things should a flow test plan cover?
The questions are free to read. Answers with their sources and self-grading are included with the pack.
Keep reading with the Platform Development Lifecycle and Deployment Architect pack
- Core concepts
- Exam traps
- Worked scenario
The pack includes:
- All 26 lessons of the Platform Development Lifecycle and Deployment Architect guide, with reading progress
- Interactive decision walks and step-by-step sequence steppers
- Inline practice questions and one-click topic practice (13 questions for this lesson)
- An official source cited for every claim
- An AI tutor that answers from the guide
- Unlimited timed practice exams