Herve37

Herve37

What API mocking tool are Elixir teams using?

We’re evaluating API mocking tools for OpenAPI-based projects and would love to hear what other teams are using.

We’re particularly interested in:

  • OpenAPI compatibility
  • Mock server capabilities
  • Easy collaboration
  • Integration with testing workflows

What has worked best for your team?

Most Liked

lud

lud

Hello,

What are you trying to mock in elixir? External APIs or your own API?

warmwaffles

warmwaffles

I have been using Sham over Bypass for a while now.

Mimic for quick mocking

Mox occasionally.

When testing with something that uses Req, I just use the built in Req.Test things. Super handy.

funboy

funboy

Why are we so afraid to code against protocols

protocols are about polymorphism based on the struct type, whereas we’re discussing behavior that depends on the environment. For example, in test env we may want to avoid making real HTTP calls or spawning real processes.

Mox is a great fit when you’re abstracting an external dependency behind a behavior. But for testing internal implementations, I find e.g. Mimic much more convenient. It lets you mock internal modules without adding extra behaviors, configuration, or maintenance overhead :sweat_smile:

Last Post!

funboy

funboy

I already asked at the very beginning, but instead of answer I was getting allegations :grimacing:

but thank u for answering it anyway :folded_hands:

that’s was never my statement - but I see u guys know better - thank u for discussion :folded_hands:

Where Next?

Popular in Discussions Top

ricklove
I was just introduced to Elixir and Phoenix. I was told about the 2 million websocket test that was done 2 years ago. From my research, t...
New
chulkilee
Here are the list of HTTP client libraries/wrappers, and some thoughts on HTTP client in general. I’d like to hear from others how they w...
New
lucaong
Hello Elixir and Nerves community, I have been working for a while on an open-source embedded key-value database for Elixir, that I call...
230 14362 124
New
tomekowal
Hey guys! I want to create a toy project that shows a chart of temperature over time and updates every 5 seconds. I feel LiveView is per...
New
Fl4m3Ph03n1x
Background This question comes mainly from my ignorance. Today is Black Friday, one of my favorite days of the year to buy books. One boo...
New
mikl
I wanted to capitalize a string, and tried using String.capitalize(). That generally works well, until you try to capitalize a word like...
New
RudManusachi
What configs will make sense to put to runtime.exs? – A bit of how I configure apps: I have generic configs in config/config.exs, dev...
New

Other popular topics Top

baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
AstonJ
Seen any cool LiveView demos, sample apps or examples? Please post them here! :003:
New

We're in Beta

About us Mission Statement