QA/TestingGeneral

Mocking / Stubbing

Also written as Mocking, Stubbing, Test Double

Replacing a real dependency (a database, an external API) with a fake, controllable stand-in during a test, so the test doesn't depend on that real system being available or behaving predictably.

Think of it like

Like using a stunt double for a dangerous scene — it stands in for the real actor so you don't have to risk the real thing for every take.

Junior or senior?

Junior sounds like

Mocks everything without weighing the tradeoff.

Senior sounds like

Has had all their mocked tests pass while the real integration was actually broken, and can describe what happened.

Ask them

“Have you ever had all your mocked tests pass while the real integration was actually broken? What happened?”