Testing Elixir with Jeffrey Matthias and Andrea Leopardi

About this Episode

Published July 15, 2021 | Duration: 56:18 | RSS Feed | Direct download
Transcript: English

While we can think of many reasons why we love Elixir, the community could always benefit from a more lively conversation around testing. It was with this in mind that Jeffrey Matthias and Andrea Leopardi decided to write Testing Elixir, and today they join us on the show to share some of the insights to be found in their new book. Our guests start by sketching out the main reasons why they decided to write a book of this nature before speaking to the process of writing it collaboratively from their respective homes in Italy and the US. Andrea and Jeffrey speak about the challenges of finding a middle ground between their unique styles to come up with a unified testing method. The conversation then takes a deep dive into the weeds of testing in Elixir and we hear our guests' perspectives on the most appropriate situations to use async true, Mox, Ecto Sandbox, and other techniques. We wrap up our interview with a question about what Andrea and Jeffrey would most like people to take away from their book where they express the hope that it can act as a springboard for further conversation about best practices for testing in Elixir and more. As always, we close the show off with our mini-interview, this time talking to Tracey Onim from Podii.

Key Points From This Episode:

  • Why Jeffrey and Andrea wrote their book and how they pitched it to the publisher.
  • How the feedback Andrea and Jeffrey got while writing the book shaped its content.
  • What writing the book was like considering its authors live in different countries.
  • How our guests came up with a unified testing method when each had their own style.
  • Stories about testing mistakes and the funny situations they led to.
  • Discussing the HBO integration test email and how it was responded to and dealt with.
  • The issue of developers not using async true enough and how to get better at it.
  • When to use async true, Ecto Sandbox, and Mox.
  • Why our guests use Mox, when the best times to use it are, and how it shapes your thinking.
  • Exploring the relationship between test driven development and using the program.
  • What can go wrong if you rely purely on tests to test out your code.
  • The main takeaways our guests hope can be found in their book.
  • Final plugs from Jeffrey and Andrea and where to find them online.
  • A quick interview where we learn more about Tracey Onim from Podii.

Links Mentioned in Today’s Episode:

SmartLogic — https://smartlogic.io/
Jeffrey Matthias on Twitter — https://twitter.com/idlehands
Andrea Leopardi — https://andrealeopardi.com/
Andrea Leopardi on Twitter — https://twitter.com/whatyouhide
Andrea Leopardi on GitHub — https://github.com/whatyouhide/corsica
Testing Elixir — http://testingelixir.com/
Testing Elixir — https://pragprog.com/titles/lmelixir/testing-elixir/
Testing Elixir — https://www.target.com/p/testing-elixir-by-andrea-leopardi-jeffrey-matthias-paperback/-/A-83072057#lnk=sametab
Testing Elixir on Twitter — https://twitter.com/testingelixir
Publish with The Pragmatic Bookshelf — https://pragprog.com/become-an-author/
Ecto.Adapters.SQL.Sandbox — https://hexdocs.pm/ecto_sql/Ecto.Adapters.SQL.Sandbox.html
Mox — https://hexdocs.pm/mox/Mox.html
Command Line Options — https://hexdocs.pm/mix/1.12/Mix.Tasks.Test.html#module-command-line-options
Mocks and Explicit Contracts — http://blog.plataformatec.com.br/2015/10/mocks-and-explicit-contracts/
bypass — https://github.com/PSPDFKit-labs/bypass
Test-Driven Development with Phoenix — https://www.tddphoenix.com/
Tracey Onim — https://www.linkedin.com/in/tracey-onim-420b3316a?originalSubdomain=ke
Podii — https://www.apollo.io/companies/Podii/5c1df0e8f651257261ddc16a?chart=count

Special Guests: Andrea Leopardi and Jeffrey Matthias.

Transcript (English):