Say it like this
- mock out the dependencies
- mock the API response
- mock this function for testing
Use it at work
Testing
- Let's mock the payment API in the tests.
- The test passes only because the mock always returns success.
Code review
- This test mocks too much. It doesn't test anything real.
- Can you use a fake instead of a mock here?
Design
- I made a quick mock of the new page.
- Here's a mock of the dashboard for feedback.
Don't say this
Mock in tech means creating a fake version, not ridiculing someone. Use critique or review for the second meaning.
Don't mix it up
| Term | What it is | Who writes or uses it | When |
|---|---|---|---|
| mock | Fake object that checks calls | Developers | Unit tests |
| stub | Fake that returns fixed data | Developers | Unit tests |
| fixture | Prepared data for tests | Developers | Test setup |
Practice
Try it
4 quick exercises
1. Your team is writing unit tests but cannot access the payment service yet. What do you say?
2. In our test suite, we _______ the HTTP requests so tests run offline.
3. Which sentence uses mock correctly in a tech context?
4. Rewrite this in natural tech English using mock: We need to create a fake version of the login system for testing.
Say it out loud
Phrase 1 of 3
"mock out the dependencies"
We don't save your recording. The word check uses your browser's speech recognition.
More about mock
Real examples(3)
- 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."
More mistakes(2)
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.
- ✕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(4)
- mock verb
"I will mock the API response in my test."
- mocked verb past tense
"She mocked the database layer last week."
- mocking verb present participle
"We are mocking external services to speed up tests."
- mock noun
"This mock object simulates the real payment gateway."
Often used with(5)
- mock object · A fake object used in testing that imitates a real dependency.
- mock API · A simulated API endpoint used during development and testing.
- mock data · Fake or sample data used for testing without using real databases or services.
- mock server · A fake server that responds to requests like a real server for testing purposes.
- mock out · Phrasal verb meaning to replace real components with mocks for testing.
Similar words(3)
- stub · Similar but stubs typically return hardcoded values; mocks can verify interactions.
- fake · A fake is any non-real implementation; mock is more specific to testing.
- simulate · Simulate is broader; mocking is a specific testing technique using simulated components.
Opposites(3)
- real
- actual
- integration test
Questions(5)
- What does mock mean in software engineering?
- Mock means to create a fake or simplified version of a component, service, or function for testing. It replaces real dependencies so tests can run independently, faster, and more reliably.
- Why do developers use mocks?
- Developers use mocks to isolate the code they are testing, avoid slow external calls, prevent side effects (like charging a credit card in tests), and make tests deterministic and repeatable.
- How do you use mock in a sentence at work?
- Example: We mocked the external API so our tests do not depend on its availability. Or: Can you mock the database layer for this unit test?
- Is mock formal or informal?
- Mock is neutral and technical. It is used in both formal documentation and casual team conversations. It is appropriate in code reviews, stand-ups, and technical writing.
- What is the difference between mocking and stubbing?
- Both replace real components with fakes. Stubs return hardcoded values; mocks can also verify that functions were called with the right arguments. Mocks are more powerful for testing interactions.



