NEW: English for Tech Bundle → Save 40%
Your progress

Loading your progress…

Home
Code & Deliveryverb|noun · /mɑːk/

mock

In simple English

In software development, mocking is a critical testing technique. When you mock something, you replace a real dependency—like a database, API, or external service—with a fake version that behaves predictably. This allows developers to test code in isolation without waiting for slow services or risking side effects. For example, instead of calling a real payment API during tests, you mock it to return predetermined responses. Mocking makes tests faster, more reliable, and easier to debug. Teams use mocking frameworks like Mockito, Jest, or Sinon to automate this process. It is essential in test-driven development and continuous integration pipelines.

What does mock mean in unit testing, and how do you use it?

At a glanceCEFR B2
Commonness4/5
Versatility4/5
FormalityCasualFormalNeutral
Spoken ↔ WrittenSpokenWrittenBoth
Directness ↔ DiplomaticDirectDiplomaticDirect
RegionUS and UK
New app · Free lessons

Speak up in meetings. Feel confident.

Standup vocabulary, native examples, and quick practice — 100+ free lessons

Start learning freeNo card needed · Google or email

Say it like this

mock out the dependencies
mock the API response
mock this function for testing

Real examples

in a standup

"Yesterday I mocked the database queries so our unit tests run 10 times faster."

in a code review

"You should mock the external payment service here instead of making real calls."

in a team meeting

"We need to mock the third-party API before we can run the full test suite."

Don't say this

Handle with care. Non-native speakers often confuse mock (create a fake version) with mock (ridicule). In tech, we almost always mean the first meaning. Do not use mock to mean making fun of something.

We mocked him for writing bad code.
We reviewed his code for bugs.Mock in tech means creating a fake version, not ridiculing someone. Use critique or review for the second meaning.
I will mock the real API.
I will mock the API to replace it with a fake version for testing.Mock is about replacement during testing, not about destroying or changing the real API.
We mocked data into the system.
We mocked the data service to return test data.You mock services or functions, not data itself. Clarify what you are replacing.

Other forms

verb

mock

"I will mock the API response in my test."

verb past tense

mocked

"She mocked the database layer last week."

verb present participle

mocking

"We are mocking external services to speed up tests."

noun

mock

"This mock object simulates the real payment gateway."

Often used with

mock objectA fake object used in testing that imitates a real dependency.
mock APIA simulated API endpoint used during development and testing.
mock dataFake or sample data used for testing without using real databases or services.
mock serverA fake server that responds to requests like a real server for testing purposes.
mock outPhrasal verb meaning to replace real components with mocks for testing.

Similar words

stubSimilar but stubs typically return hardcoded values; mocks can verify interactions.
fakeA fake is any non-real implementation; mock is more specific to testing.
simulateSimulate is broader; mocking is a specific testing technique using simulated components.

Opposites

realactualintegration test

Practice

Try it

4 quick exercises

Pick the most natural phrasing

1. Your team is writing unit tests but cannot access the payment service yet. What do you say?

Complete the sentence

2. In our test suite, we _______ the HTTP requests so tests run offline.

Spot the mistake

3. Which sentence uses mock correctly in a tech context?

Rewrite naturally

4. Rewrite this in natural tech English using mock: We need to create a fake version of the login system for testing.

Questions

Quick poll

Have you said "mock" in a standup this week?

Want more structured practice like this? Our English for Programmers course covers real workplace English in depth.

Your badges