3 ms·
Ask HN: Interacting with Testing and Mocking Tools
I am a professor at the University of Michigan, and I am trying to understand the different testing and mocking habits of developers in the context of a research project.
Imagine that you are testing a new software application that you have developed that requires mocking both internal and external dependencies (accessed via REST APIs). You have found the perfect tool for your testing and mocking needs. The tool offers different ways of interacting with it:
1. CLI/Terminal commands: e.g. spinning up a testing/mocking binary (separate from your application’s executable), which interacts with the application under test;
2. SDK/Library: e.g. interacting with the mocking tool using language bindings that are native to the code of your application under test;
3. REST or GraphQL API: You control and configure the mocking tool using API calls initiated via your test code.
As a developer or tester, which of those ways do you typically prefer, and why? If you use a different way that I have not mentioned, I would also be interested to hear about it.