A B2B SaaS app serves hundreds of tenants from one database. How would you test that one tenant can never see another tenant's data?
JuniorAuthenticate as tenant A, then request tenant B's resources directly by ID — through the API, not just the UI — and assert you get a 403/404, never tenant B's data.
// What interviewers look for
That you locate isolation at the data layer: every query must carry a tenant_id predicate. You should seed at least two isolated tenant accounts and probe the API directly rather than trusting the rendered UI.
Common pitfall
Describing only UI checks ('the other tenant isn't shown in the list'). A hidden list item is still returned by the API to any client that asks for it by ID.
Model answer
I'd seed two fully isolated tenants, A and B, each with known records. As tenant A I'd first confirm normal flows return only A's data. Then I'd take a known resource ID belonging to B and request it directly via the API — GET, and also PUT/DELETE — asserting a 403 or 404 every time, never B's payload. I'd repeat across list, detail, search, and export endpoints, because isolation often holds on the obvious read path but leaks through search or a bulk-export query that forgot the tenant scope. The mental model I'm testing is 'is there a tenant_id in the WHERE clause of every query', so I treat any cross-tenant 200 as a data breach, not a cosmetic bug.