The first step to writing fault tolerant and scalable code is writing bug free code. In these lessons we explore how best to test our Elixir code.
Testing is an important part of developing software. In this lesson we’ll look at how to test our Elixir code with ExUnit and some best practices for doing so.
When testing our applications there are often times we need to make requests to external services. We may even want to simulate different situations like unexpected server errors. Handling this in an efficient way doesn’t come easy in Elixir without a little help.
In this lesson we’re going to explore how bypass can help us quickly and easily handle these requests in our tests.
Mox is a library for designing concurrent mocks in Elixir.
An example-based unit testing library like ExUnit is a wonderful tool to help you verify that your code works the way you think it does. However, example-based unit tests have some drawbacks:
In this lesson we’re going to explore how StreamData can help us overcome some of these drawbacks.