The 'System Admin' Trap: Why Admin Testing Is Not Real Testing
The Illusion of the Green Build
We have all been there. You are rushing to close out a sprint. You log into the Sandbox, run through the happy path, and everything works beautifully. The record saves, the Flow triggers, the email fires. You mark the story "Passed."
Two days after deployment, a ticket lands in your queue: "Sales Reps cannot see the new Discount field."
What happened? You fell into the most common trap in the Salesforce ecosystem: Admin Functional Testing.
If you are testing Salesforce features exclusively as a System Administrator, you aren't testing the system. You are testing Salesforce’s safety bypass.
Why Admin Is the Most Dangerous Test User
The System Administrator profile is a special case in the Salesforce architecture. It is designed to govern the Org, not to use it like a Sales Rep or a Service Agent.
When you test as an Admin, you are operating with "Modify All Data" and "View All Data" permissions. In this mode, Salesforce:
- Ignores most Organization-Wide Defaults (OWD) and Sharing Rules.
- Bypasses Field-Level Security (FLS).
- Sees all Record Types.
- Can edit locked records.
Admin behavior is not representative of any real user.
When you run a test case as an Admin, you are answering the wrong question. You are asking, "Can Salesforce technically perform this action?" instead of, "Can the intended user perform this action?"
The "It Works For Me" False Positive
Admin testing creates the most convincing false positive in our line of work. It creates an environment where defects are invisible because the tester has superpowers that the end-users do not.
Here is how this manifests in real-world failures:
1. The Invisible Field
You added a new field to the Opportunity object. As an Admin, you see it on the Page Layout. You enter data, save it, and verify the report. It looks perfect.
In Production, the Sales Rep logs in. The field is missing. Why? Because the Field-Level Security wasn't granted to the "Standard User" or custom Sales profile. The Admin sees everything by default; the user sees nothing by default. The test was invalid because it didn't check visibility.
2. The Flow That Doesn't Flow
Flows are powerful, but they are sensitive to context. If a Screen Flow runs in User Context, it respects the user's permissions.
You test a Flow that updates a parent Account when a Contact is changed. As an Admin, you own everything, so the update works. A standard user, however, might have Read-Only access to that Account via a Sharing Rule. When they try to trigger the Flow, it fails with an "Insufficient Privileges" error.
You signed off on the feature. The user got an unhandled fault exception.
Why Do We Keep Doing This?
We rely on Admin testing because it is seductive. It is fast. It is efficient.
Testing as an Admin means you don't have to log out and log back in (though the "Login As" feature makes this trivial). You don't have to worry about creating test users, setting up Role Hierarchies, or debugging why you can't see a record. It feels like you are moving the ticket forward.
But you are trading validity for speed. A test that passes for the wrong reasons is worse than no test at all because it gives stakeholders false confidence.
QA Takeaways
As Salesforce testers, we must adopt a strict mindset: A feature is not "working" unless it works for the least privileged intended user.
Here is how to correct the course:
- Identify the Persona: Before you start testing, look at the User Story. Who is this for? A Support Agent? A Manager? A Partner Community user?
- Login As: Use the "Login as User" feature found in Setup > Users. Never test functional requirements while viewing the Setup menu.
- Test the Negative: Don't just test that the Manager can approve the quote. Test that the Sales Rep cannot approve it. Admin testing makes these negative test cases impossible to verify.
- Reserve Admin for Setup: Use your Admin access for smoke checks, environment setup, and debugging errors. Once the debugging is done, verify the fix as the user.
The Bottom Line
If your test user can access Setup, see every record in the database, and bypass validation rules, your test result is incomplete.
Admin testing is a shortcut. And in the world of Salesforce, shortcuts always reappear as production incidents.
Remember: If it only works for Admin, it does not work.