Performance testing: how fast under normal conditions. Load testing: how it behaves under expected load. Stress testing: how it fails under extreme load.
Tools:
- Apache JMeter — generic; widely used.
- Gatling — high-throughput, scriptable.
- k6 — modern, JavaScript-based.
- Salesforce-specific: Provar, Tosca with performance modules.
- Browser-based: Lighthouse, WebPageTest for Lightning page performance.
Test scenarios:
1. Page load time.
- Lightning Record Pages.
- Dashboard loading.
- Search results.
- Reports.
Target: < 3 seconds for 95th percentile.
2. Bulk operations.
- Mass record updates.
- Large data loads (Bulk API).
- Sharing recalculation.
- Roll-up summary recomputation.
3. API integration.
- Inbound webhook handling.
- Outbound callouts.
- High-volume integrations.
4. Concurrent users.
- Simulate 100s, 1000s concurrent.
- Record creation, search, navigation.
- Identify contention.
5. Apex execution.
- Trigger time per record.
- Flow execution time.
- Async job throughput.
Approach:
1. Baseline measurement.
- Current state performance.
- Establish what's "normal".
2. Define targets.
- Page load < X seconds.
- Bulk operation < Y minutes.
- N concurrent users without degradation.
3. Test environment.
- Full Sandbox (most realistic).
- Realistic data volumes.
- Realistic user count.
4. Test execution.
- Ramp up gradually.
- Sustained load.
- Spike load.
5. Identify bottlenecks.
- CPU consumption.
- Memory.
- Sharing recalc.
- Slow queries.
- API limits.
6. Optimise.
- Custom Indexes.
- Bulkification.
- Caching.
- Async processing.
7. Re-test.
- Confirm improvements.
Common pitfalls:
- Test in tiny sandbox — performance issues invisible.
- Unrealistic data — different from production.
- Synthetic users — different patterns from real users.
- Test once, never re-test — performance regresses silently.
Architecture for performance testing:
- Dedicated test environment with realistic data.
- Repeatable scripts in version control.
- Reporting dashboards.
- CI integration — perf tests on major releases.
Senior QA insight: performance is a non-functional requirement. Should be tested like any other.
The senior framing: performance testing reveals architecture issues. Often architectural choices, not code, are the bottleneck.
