Mocks in Software Testing

Discussions center on using mocks for API and unit testing, promoting a tool called 'mock', debating mocks vs. fakes/stubs/real dependencies, and mentioning alternatives like WireMock, VCR, and SoapUI.

➡️ Stable 0.5x Web Development
2,099
Comments
20
Years Active
5
Top Authors
#6084
Topic ID

Activity Over Time

2007
1
2008
4
2009
8
2010
34
2011
36
2012
61
2013
102
2014
101
2015
96
2016
108
2017
89
2018
116
2019
125
2020
206
2021
230
2022
180
2023
232
2024
161
2025
203
2026
6

Keywords

LOGO leanpub.com LLM S3 DSL github.io HTTP examples.html i.e server.com mocks mock mocking testing fakes test api responses tests interfaces

Sample Comments

min2bro Jan 23, 2019 View on HN

Why mock? There are other tools like soap ui etc.

apta Dec 4, 2019 View on HN

What do you use instead of mocks when testing?

vintagedave Sep 29, 2024 View on HN

That sounds potentially really neat for mocking API calls.

dekhn Jun 28, 2019 View on HN

now that's a great test case that could easily be tested using mocks.

revskill Jan 8, 2023 View on HN

Test to me is a tool for debugging. Mock is at least useless to me. Use real mock instead by introduce real dependency, but with local effects.

dhuan_ Jan 12, 2026 View on HN

mock, an API creation and testing utility. Any feedback is welcome!https://dhuan.github.io/mock/latest/examples.html

dhuan_ Nov 10, 2025 View on HN

mock, an API creation and testing utility. Any feedback is welcome!https://dhuan.github.io/mock/latest/examples.html

dhuan_ Dec 14, 2025 View on HN

mock, an API creation and testing utility. Any feedback is welcome!https://dhuan.github.io/mock/latest/examples.html

kindofabigdeal Feb 1, 2023 View on HN

Either a test environment or a mocking library

SoftTalker Jul 4, 2025 View on HN

Awesome, now I don't have to write mocks for testing!