JOURNAL
Talking About Testing and Mocking Like a Developer
Learn English vocabulary for unit tests, mocks and flaky tests, with pronunciation drills and exercises for developers.

On this page
A junior engineer on my old team once asked, “Why are we pretending the database is there if it isn’t?” That’s exactly what a mock does — it pretends. You write a fake version of something real so your test can run fast, in isolation, without touching a real database, API, or file system. That pretending has a name, and it’s today’s Word of the Day.
Word of the Day: Mock
IPA: /mɒk/ (UK) · /mɑːk/ (US)
Vietnamese: giả lập, đối tượng giả — một phiên bản giả của một thành phần thật (như database hay API), dùng để kiểm thử mà không cần gọi tới thành phần thật.
- We mock the payment API so the test suite doesn’t make real charges.
- This test fails because the mock was never configured to return a valid response.
- Don’t mock everything — if you mock too much, you’re not really testing anything.
Listen and check your pronunciation: Cambridge Dictionary — mock (audio + definition) and YouGlish — mock in real videos.
Vocabulary Table
| Phrase | Vietnamese | Example |
|---|---|---|
| unit test | kiểm thử đơn vị | Each function should have a unit test that checks it in isolation. |
| mock / stub | đối tượng giả lập | We used a stub to return a fixed value instead of calling the real service. |
| test coverage | độ phủ kiểm thử | Our test coverage dropped after we rushed that last feature. |
| edge case | trường hợp biên | Remember to test the edge case where the list is empty. |
| flaky test | bài kiểm thử không ổn định (lúc pass lúc fail) | That flaky test fails randomly in CI, so nobody trusts it anymore. |
How a Mocked Test Actually Runs
A unit test calls the function you’re testing. That function needs a dependency — a database, an API, a file. Instead of using the real one, the test swaps in a mock object: something that looks like the dependency but just returns whatever response you scripted. The test then runs an assertion to check if the actual result matches what you expected.

Pronunciation Guide
Mock is a single syllable: /mɒk/ or /mɑːk/.
- m- — a clean, closed-lip /m/, don’t add an extra vowel before it.
- -o- — a short, open vowel. UK speakers round the lips slightly more than US speakers.
- -ck — a sharp, stopped /k/ at the end. Don’t let it trail off into “mock-uh.”
Common mistake: Vietnamese speakers sometimes add a vowel sound after the final “ck,” turning “mock” into something closer to two syllables. Keep it short and stopped — it should sound almost clipped.
Practice sentence (read aloud 3 times):
“We mock the external API in our unit tests so the test suite stays fast and doesn’t depend on the network.”
Exercise 1: Fill in the Blank
- We ______ the database call so the test doesn’t need a real connection.
- Nobody trusts that ______ test anymore because it fails randomly in CI.
- Make sure you test the ______ where the input list is empty.
- Our ______ dropped below 70% after the last release.
- Each small function should have its own ______ to check it works in isolation.
Show answers
- mock
- flaky
- edge case
- test coverage
- unit test
Exercise 2: Translate
Translate into English:
- Chúng tôi giả lập API bên ngoài để bài kiểm thử chạy nhanh hơn.
- Bài kiểm thử này không ổn định, lúc thì pass lúc thì fail.
- Đừng quên kiểm tra trường hợp biên khi danh sách trống.
Show answers
- We mock the external API so the test runs faster.
- This test is flaky — it passes sometimes and fails other times.
- Don’t forget to test the edge case where the list is empty.
Idiom of the Day: Cut Corners
Vietnamese: làm tắt, bỏ qua các bước cần thiết để làm nhanh hơn, thường khiến chất lượng giảm sút.
- We cut corners on testing before the launch, and it cost us a production outage the next week.
- Don’t cut corners on edge cases just because the deadline is tomorrow.
Recommended Watching
- ArjanCodes — clear explanations of testing, mocking, and software design patterns in Python.
- Code Aesthetic — thoughtful breakdowns of why we test code the way we do, in plain English.
Today’s Challenge
Find one test in your codebase today and say out loud, in English, what it mocks and why. One sentence: “This test mocks ___ so that ___.”

Discussion
Comments are reviewed before publication. Your email is kept private.