# \#tdd

**URL:** https://forum.elixirforum.com/tag/tdd/273.md

[Latest](https://forum.elixirforum.com/latest.md) · [Categories](https://forum.elixirforum.com/categories.md) · [Tags](https://forum.elixirforum.com/tags.md)

---

## [What is a good workflow for doing TDD with Elixir?](https://forum.elixirforum.com/t/what-is-a-good-workflow-for-doing-tdd-with-elixir/75132)

<div class="topic-metadata">

**Author:** [@mr\_smith](https://forum.elixirforum.com/u/mr_smith)\
**Replies:** 3\
**Last updated:** [April 25, 2026, 3:23pm UTC](https://forum.elixirforum.com/t/what-is-a-good-workflow-for-doing-tdd-with-elixir/75132 "2026-04-25T15:23:51Z")

</div>

Hello there. I’m wondering if people have any tips for doing TDD with Elixir. I am specifically wondering if it is possible to configure mix test to only show which tests failed. I find the output to be very noisy (lot…

---

## [Test-Driven Development with Phoenix (self-published) (free)](https://forum.elixirforum.com/t/test-driven-development-with-phoenix-self-published-free/35154)

<div class="topic-metadata">

**Author:** [@germsvel](https://forum.elixirforum.com/u/germsvel)\
**Replies:** 44\
**Last updated:** [September 30, 2024, 7:00am UTC](https://forum.elixirforum.com/t/test-driven-development-with-phoenix-self-published-free/35154 "2024-09-30T07:00:13Z")

</div>

:waving\_hand: Hi there, I’ve been working on a Test-Driven Development with Phoenix book. It teaches TDD and BDD by building a chat app from the outside-in. It’s still a work in progress, but the overall TDD process is …

---

## [Test database vs. dev database when connecting Livebook notebook to local app](https://forum.elixirforum.com/t/test-database-vs-dev-database-when-connecting-livebook-notebook-to-local-app/48852)

<div class="topic-metadata">

**Author:** [@SArthur](https://forum.elixirforum.com/u/SArthur)\
**Replies:** 4\
**Last updated:** [April 22, 2024, 3:27pm UTC](https://forum.elixirforum.com/t/test-database-vs-dev-database-when-connecting-livebook-notebook-to-local-app/48852 "2024-04-22T15:27:17Z")

</div>

I am in love with Livebook! My hope is to use it for everything from data exploration and feature planning, documentation, and TDD in a cohesive way… amazing if it comes together! On the TDD front, I have successfully c…

---

## [When to use feature tests? Have I been overusing Wallaby?](https://forum.elixirforum.com/t/when-to-use-feature-tests-have-i-been-overusing-wallaby/58995)

<div class="topic-metadata">

**Author:** [@coen.bakker](https://forum.elixirforum.com/u/coen.bakker)\
**Replies:** 3\
**Last updated:** [October 15, 2023, 7:52pm UTC](https://forum.elixirforum.com/t/when-to-use-feature-tests-have-i-been-overusing-wallaby/58995 "2023-10-15T19:52:34Z")

</div>

I have recently started using TDD for Phoenix/LiveView. I read the tddphoenix.com course and really liked this approach to building features. Following the example on tddphoenix.com, I have been using Wallaby for my feat…

---

## [London school TDD books?](https://forum.elixirforum.com/t/london-school-tdd-books/29662)

<div class="topic-metadata">

**Author:** [@Fl4m3Ph03n1x](https://forum.elixirforum.com/u/Fl4m3Ph03n1x)\
**Replies:** 10\
**Last updated:** [April 26, 2023, 12:27pm UTC](https://forum.elixirforum.com/t/london-school-tdd-books/29662 "2023-04-26T12:27:48Z")

</div>

Background Hey guys, recently I bought a book on TDD that I am reading. The books is really nice and has some really juicy things on architecture, but at the same time it has two main characterists I really don’t like: …

---

## [Blog Post: Elixir mock (test double) testing seams: a modest proposal](https://forum.elixirforum.com/t/blog-post-elixir-mock-test-double-testing-seams-a-modest-proposal/54807)

<div class="topic-metadata">

**Author:** [@paulanthonywilson](https://forum.elixirforum.com/u/paulanthonywilson)\
**Replies:** 0\
**Last updated:** [March 24, 2023, 5:04pm UTC](https://forum.elixirforum.com/t/blog-post-elixir-mock-test-double-testing-seams-a-modest-proposal/54807 "2023-03-24T17:04:40Z")

</div>

When using mocks in Elixir, particularly with Mox then the standard way of loading the implementation is along the lines of Application.get\_env(:cat\_facts, CatFacts.CatFactsApi, CatFacts.RealCatFactsApi) . In this post…

---

## [How Best to Use TDD for Random Generation](https://forum.elixirforum.com/t/how-best-to-use-tdd-for-random-generation/48620)

<div class="topic-metadata">

**Author:** [@JEG2](https://forum.elixirforum.com/u/JEG2)\
**Replies:** 4\
**Last updated:** [June 30, 2022, 2:42am UTC](https://forum.elixirforum.com/t/how-best-to-use-tdd-for-random-generation/48620 "2022-06-30T02:42:22Z")

</div>

There is some code that I’m still not good at building out with a process of Test-driven Development. One of those challenges is random content generators. For example, I used to play a great BBS game called TradeWars.…

---

## [Elixir Meetup #6 TDD with Liveview simpler than you imagine! (Gustavo Oliveira) & Learning Erlang and Elixir through Exercism and Advent of Code (Adolfo Neto)](https://forum.elixirforum.com/t/elixir-meetup-6-tdd-with-liveview-simpler-than-you-imagine-gustavo-oliveira-learning-erlang-and-elixir-through-exercism-and-advent-of-code-adolfo-neto/48396)

<div class="topic-metadata">

**Author:** [@renatacuriosum](https://forum.elixirforum.com/u/renatacuriosum)\
**Replies:** 1\
**Last updated:** [June 15, 2022, 1:11pm UTC](https://forum.elixirforum.com/t/elixir-meetup-6-tdd-with-liveview-simpler-than-you-imagine-gustavo-oliveira-learning-erlang-and-elixir-through-exercism-and-advent-of-code-adolfo-neto/48396 "2022-06-15T13:11:08Z")

</div>

We discussed 2 presentations of our Elixir experts: Gustavo Oliveira: TDD with Liveview simpler than you imagine! Description: We have been discussing TDD for over 10 years ago, and how good amazing is…

---

## [Code coverage tools for Elixir?](https://forum.elixirforum.com/t/code-coverage-tools-for-elixir/18102)

<div class="topic-metadata">

**Author:** [@Fl4m3Ph03n1x](https://forum.elixirforum.com/u/Fl4m3Ph03n1x)\
**Replies:** 17\
**Last updated:** [May 30, 2022, 9:56am UTC](https://forum.elixirforum.com/t/code-coverage-tools-for-elixir/18102 "2022-05-30T09:56:20Z")

</div>

Background I have a test suite and I need to know the coverage of the project. I have played around with mix test --cover but I find the native erlang’s coverage analysis tool to be insufficient at best. The native cov…

---

## [YOU DONT UNIT TEST? DevHour #1 Theo](https://forum.elixirforum.com/t/you-dont-unit-test-devhour-1-theo/47424)

<div class="topic-metadata">

**Author:** [@thiagomajesk](https://forum.elixirforum.com/u/thiagomajesk)\
**Replies:** 3\
**Last updated:** [April 26, 2022, 9:33pm UTC](https://forum.elixirforum.com/t/you-dont-unit-test-devhour-1-theo/47424 "2022-04-26T21:33:11Z")

</div>

Found this on my Youtube feed today after watching another clip on Merge vs Rebase workflows (which was really cool to watch BTW)… The (in)famous Primeagen talks with this Theo guy (ex Twitch apparently) about their opin…

---

## [Elixir Blog Post: Doctest functions with side effects](https://forum.elixirforum.com/t/elixir-blog-post-doctest-functions-with-side-effects/46884)

<div class="topic-metadata">

**Author:** [@RudManusachi](https://forum.elixirforum.com/u/RudManusachi)\
**Replies:** 0\
**Last updated:** [March 29, 2022, 7:42am UTC](https://forum.elixirforum.com/t/elixir-blog-post-doctest-functions-with-side-effects/46884 "2022-03-29T07:42:45Z")

</div>

Hi there! :wave: It’s me again! Lately I’ve been working on documentation for the project, including adding some context function usage examples, and wanted to “doctest” them for the sake of correctness. However, I not…

---

## [Mox mocks not working for other processes](https://forum.elixirforum.com/t/mox-mocks-not-working-for-other-processes/22011)

<div class="topic-metadata">

**Author:** [@Fl4m3Ph03n1x](https://forum.elixirforum.com/u/Fl4m3Ph03n1x)\
**Replies:** 11\
**Last updated:** [January 28, 2022, 10:49am UTC](https://forum.elixirforum.com/t/mox-mocks-not-working-for-other-processes/22011 "2022-01-28T10:49:58Z")

</div>

Background I have a small app where I have a pool that creates several workers. The pool acts as a supervisor for said workers. Both (the pool and the workers) have a dependency on another module, the ExRegistry. This m…

---

## [TDD with large phoenix projects](https://forum.elixirforum.com/t/tdd-with-large-phoenix-projects/45113)

<div class="topic-metadata">

**Author:** [@sodapopcan](https://forum.elixirforum.com/u/sodapopcan)\
**Replies:** 4\
**Last updated:** [January 11, 2022, 3:28pm UTC](https://forum.elixirforum.com/t/tdd-with-large-phoenix-projects/45113 "2022-01-11T15:28:45Z")

</div>

I recently started a new job where I’m working working on a large Phoenix app for the first time. Running tests, or even one test, is very slow. I discovered that this was, in part, due to a test alias that was re-crea…

---

## [Erlang Blog Post: Inaka / TDD, Coverage and Why Testing Exceptions](https://forum.elixirforum.com/t/erlang-blog-post-inaka-tdd-coverage-and-why-testing-exceptions/44845)

<div class="topic-metadata">

**Author:** [@elbrujohalcon](https://forum.elixirforum.com/u/elbrujohalcon)\
**Replies:** 0\
**Last updated:** [December 27, 2021, 11:59am UTC](https://forum.elixirforum.com/t/erlang-blog-post-inaka-tdd-coverage-and-why-testing-exceptions/44845 "2021-12-27T11:59:40Z")

</div>

Another week, another oldies-but-goldies post… This one about Test Driven Development. https://tealfeed.com/tdd-coverage-why-testing-exceptions-gjhj4

---

## [Should I go with TDD, when the deadline is tight?](https://forum.elixirforum.com/t/should-i-go-with-tdd-when-the-deadline-is-tight/14121)

<div class="topic-metadata">

**Author:** [@aadii104](https://forum.elixirforum.com/u/aadii104)\
**Replies:** 34\
**Last updated:** [May 28, 2021, 5:51pm UTC](https://forum.elixirforum.com/t/should-i-go-with-tdd-when-the-deadline-is-tight/14121 "2021-05-28T17:51:54Z")

</div>

Hello all, We all know benefits of TDD, but my question is should I go with the approach when time to deliver my project is less as writing test and design code pieces could be time taking. Of course I am looking for a…

---

## [An example of test-driven design](https://forum.elixirforum.com/t/an-example-of-test-driven-design/39255)

<div class="topic-metadata">

**Author:** [@marick](https://forum.elixirforum.com/u/marick)\
**Replies:** 0\
**Last updated:** [April 27, 2021, 7:54pm UTC](https://forum.elixirforum.com/t/an-example-of-test-driven-design/39255 "2021-04-27T19:54:57Z")

</div>

I was involved in a discussion about test-driven design and property-based testing as design tools. I wrote some code in TDD style. Since this for a discussion about design, I took notes for each step and wrote them up a…

---

## [ESpec - Elixir Behaviour Driven Development](https://forum.elixirforum.com/t/espec-elixir-behaviour-driven-development/6656)

<div class="topic-metadata">

**Author:** [@antonmi](https://forum.elixirforum.com/u/antonmi)\
**Replies:** 9\
**Last updated:** [April 18, 2021, 9:57pm UTC](https://forum.elixirforum.com/t/espec-elixir-behaviour-driven-development/6656 "2021-04-18T21:57:32Z")

</div>

Hi, colleagues! I’ve discovered this awesome forum recently and I wanna share my projects and ideas. First of all, I create a topic about ESpec testing framework. ESpec is inspired by RSpec Ruby library and implements…

---

## [Mox test failing with \`stub\_with\`](https://forum.elixirforum.com/t/mox-test-failing-with-stub-with/22005)

<div class="topic-metadata">

**Author:** [@Fl4m3Ph03n1x](https://forum.elixirforum.com/u/Fl4m3Ph03n1x)\
**Replies:** 5\
**Last updated:** [June 21, 2020, 4:51am UTC](https://forum.elixirforum.com/t/mox-test-failing-with-stub-with/22005 "2020-06-21T04:51:03Z")

</div>

Background I have a small app with a pool manager, a couple workers and a registry. For the sake of learning Mox, I made a small test that uses Mox, but it fails for a reason I can’t understand. Code This code is a MWE…

---

## [A practical example of TDD Outside-in with Elixir](https://forum.elixirforum.com/t/a-practical-example-of-tdd-outside-in-with-elixir/29332)

<div class="topic-metadata">

**Author:** [@joebew42](https://forum.elixirforum.com/u/joebew42)\
**Replies:** 1\
**Last updated:** [March 3, 2020, 3:29pm UTC](https://forum.elixirforum.com/t/a-practical-example-of-tdd-outside-in-with-elixir/29332 "2020-03-03T15:29:41Z")

</div>

Hello :wave: This is a follow up for the Good Elixir TDD resources? thread. It was my intention to make a video about TDD Outside-In with Elixir, and it is finally available on YouTube. The purpose of the video is to …

---

## [How to write tests for public functions with many complex private functions](https://forum.elixirforum.com/t/how-to-write-tests-for-public-functions-with-many-complex-private-functions/29567)

<div class="topic-metadata">

**Author:** [@lamtrhieu](https://forum.elixirforum.com/u/lamtrhieu)\
**Replies:** 9\
**Last updated:** [March 3, 2020, 2:53pm UTC](https://forum.elixirforum.com/t/how-to-write-tests-for-public-functions-with-many-complex-private-functions/29567 "2020-03-03T14:53:38Z")

</div>

Hi everyone, I have a module with several public api and the implementation for these public require call to several private functions. Something like this def foo do bar baa baz end defp baa do ... end defp b…

---

## [TDD in Elixir with tests that hit the database](https://forum.elixirforum.com/t/tdd-in-elixir-with-tests-that-hit-the-database/26249)

<div class="topic-metadata">

**Author:** [@gophertroll](https://forum.elixirforum.com/u/gophertroll)\
**Replies:** 12\
**Last updated:** [March 3, 2020, 1:15pm UTC](https://forum.elixirforum.com/t/tdd-in-elixir-with-tests-that-hit-the-database/26249 "2020-03-03T13:15:30Z")

</div>

I’m new to Elixir, and I’m wondering if I might be doing something wrong in my tests. Right now, I have only 105 tests, but they take ~30 seconds to run. For TDD, this is much too slow. The tests that seem to be the s…

---

## [Good Elixir TDD resources?](https://forum.elixirforum.com/t/good-elixir-tdd-resources/17482)

<div class="topic-metadata">

**Author:** [@Fl4m3Ph03n1x](https://forum.elixirforum.com/u/Fl4m3Ph03n1x)\
**Replies:** 35\
**Last updated:** [November 11, 2019, 9:56pm UTC](https://forum.elixirforum.com/t/good-elixir-tdd-resources/17482 "2019-11-11T21:56:52Z")

</div>

Background After following the communitiy suggestion, I bought the Elixir in Action 2nd Edition book and I am about to finish it now. I must say it really helped me out and I am quite glad I bought it. Now I need to loo…

---

## [BDD / TDD criticized](https://forum.elixirforum.com/t/bdd-tdd-criticized/759)

<div class="topic-metadata">

**Author:** [@StefanHoutzager](https://forum.elixirforum.com/u/StefanHoutzager)\
**Replies:** 104\
**Last updated:** [September 30, 2019, 1:27pm UTC](https://forum.elixirforum.com/t/bdd-tdd-criticized/759 "2019-09-30T13:27:21Z")

</div>

Interesting read: http://rbcs-us.com/documents/Why-Most-Unit-Testing-is-Waste.pdf Reminds me of Rich Hickey, who said in an interview:“Each of us needs to assess how best to spend our time in order to maximize our resul…

---

## [Test processes using handle\_continue](https://forum.elixirforum.com/t/test-processes-using-handle-continue/22090)

<div class="topic-metadata">

**Author:** [@Fl4m3Ph03n1x](https://forum.elixirforum.com/u/Fl4m3Ph03n1x)\
**Replies:** 31\
**Last updated:** [May 3, 2019, 5:16pm UTC](https://forum.elixirforum.com/t/test-processes-using-handle-continue/22090 "2019-05-03T17:16:56Z")

</div>

Background I have a process that does nothing in it’s init function and delegates all the work to a handle\_continue. I do this because the work being done in the handle\_continue is quite heavy, and since this is a Worker…

---

## [Make ExUnit test pass when process fails to start](https://forum.elixirforum.com/t/make-exunit-test-pass-when-process-fails-to-start/22031)

<div class="topic-metadata">

**Author:** [@Fl4m3Ph03n1x](https://forum.elixirforum.com/u/Fl4m3Ph03n1x)\
**Replies:** 2\
**Last updated:** [April 30, 2019, 2:25pm UTC](https://forum.elixirforum.com/t/make-exunit-test-pass-when-process-fails-to-start/22031 "2019-04-30T14:25:03Z")

</div>

Background I have a process that tries to establish a connection to a server and I am testing it. On the happy path, I check that the process does it’s job once it connects. But its the sad path that is interesting. Sho…

---

## [Classicist VS Mockist TDD in Elixir](https://forum.elixirforum.com/t/classicist-vs-mockist-tdd-in-elixir/21936)

<div class="topic-metadata">

**Author:** [@Fl4m3Ph03n1x](https://forum.elixirforum.com/u/Fl4m3Ph03n1x)\
**Replies:** 12\
**Last updated:** [April 26, 2019, 2:08pm UTC](https://forum.elixirforum.com/t/classicist-vs-mockist-tdd-in-elixir/21936 "2019-04-26T14:08:47Z")

</div>

Background For those of you wondering what classical TDD is and Mockist TDD is: Mainly, classical TDD is focused on testing system boundaries and treats your projects like a black box. It provides for flexible tests t…

---

## [Absinthe TDD Best Practices](https://forum.elixirforum.com/t/absinthe-tdd-best-practices/21804)

<div class="topic-metadata">

**Author:** [@amacgregor](https://forum.elixirforum.com/u/amacgregor)\
**Replies:** 2\
**Last updated:** [April 21, 2019, 4:48pm UTC](https://forum.elixirforum.com/t/absinthe-tdd-best-practices/21804 "2019-04-21T16:48:25Z")

</div>

Hi Peeps, I’m looking for best practices, tutorials or any recommendations on how to TDD with Absinthe; there doesn’t seem to be much on terms of testing Absinthe GraphQL APIs even the “Craft GraphQL APIs in Elixir with…

---

## [How to test side effects on other processes?](https://forum.elixirforum.com/t/how-to-test-side-effects-on-other-processes/19433)

<div class="topic-metadata">

**Author:** [@Fl4m3Ph03n1x](https://forum.elixirforum.com/u/Fl4m3Ph03n1x)\
**Replies:** 4\
**Last updated:** [January 16, 2019, 3:49pm UTC](https://forum.elixirforum.com/t/how-to-test-side-effects-on-other-processes/19433 "2019-01-16T15:49:04Z")

</div>

Background I have a module that makes a async request to another service. This async request is made via Task.start and I literally don’t care if the request fails or not, I only want to make it. My objective here, is t…

---

## [Test-driving the development of an application with Phoenix channels and Genservers ](https://forum.elixirforum.com/t/test-driving-the-development-of-an-application-with-phoenix-channels-and-genservers/18987)

<div class="topic-metadata">

**Author:** [@disappearer](https://forum.elixirforum.com/u/disappearer)\
**Replies:** 0\
**Last updated:** [December 26, 2018, 8:12pm UTC](https://forum.elixirforum.com/t/test-driving-the-development-of-an-application-with-phoenix-channels-and-genservers/18987 "2018-12-26T20:12:44Z")

</div>

Hello :slight\_smile: Recently we have been developing an application that uses Phoenix channels. It has rooms that users can join and each room has a state which is managed through a genserver. The room channel handles …

---

## [Is TDD Dead?](https://forum.elixirforum.com/t/is-tdd-dead/18252)

<div class="topic-metadata">

**Author:** [@Fl4m3Ph03n1x](https://forum.elixirforum.com/u/Fl4m3Ph03n1x)\
**Replies:** 10\
**Last updated:** [December 3, 2018, 4:23pm UTC](https://forum.elixirforum.com/t/is-tdd-dead/18252 "2018-12-03T16:23:25Z")

</div>

Let’s talk about Test Driven Development (TDD) What if we could put in the same place Kent Beck, Martin Fowler and a provocateur interviewing them both? What if we wanted to analyze TDD? Is TDD the Holy Grail? Should we…

[Next page](https://forum.elixirforum.com/tag/tdd/273.md?match_all_tags=true&page=1&tags%5B%5D=tdd)
