# Testing Elixir (PragProg)

**URL:** <https://forum.devtalk.com/t/testing-elixir-pragprog/672>\
**Category:** Backend Learning Resources\
**Tags:** published-book, pragprog, elixir, book-testing-elixir\
**Created:** [3 June 2020 18:49 UTC](https://forum.devtalk.com/t/testing-elixir-pragprog/672 "2020-06-03T18:49:34Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![PragmaticBookshelf](https://forum.devtalk.com/user_avatar/forum.devtalk.com/pragmaticbookshelf/32/463_2.png) [@PragmaticBookshelf](https://forum.devtalk.com/u/PragmaticBookshelf)\
**Post date:** [3 June 2020 18:49 UTC](https://forum.devtalk.com/t/testing-elixir-pragprog/672/1 "2020-06-03T18:49:34Z")

</div>

Write Elixir tests that you can be proud of. Dive into Elixir’s test philosophy and gain mastery over the terminology and concepts that underlie good tests

 ![lmelixir](https://forum.devtalk.com/uploads/default/original/1X/43741dd161c040a935588e57dfbc82629eb94485.jpeg)

### Andrea Leopardi @whatyouhide and Jeffrey Matthias @idlehands

_edited by Jacquelyn Carter @jkcarter_

Write Elixir tests that you can be proud of. Dive into Elixir’s test philosophy and gain mastery over the terminology and concepts that underlie good tests. Create and structure a comprehensive ExUnit test suite, starting from the basics, and build comprehensive test coverage that will provide safety for refactoring and confidence that your code performs as designed. Use tests to make your software more reliable and fault tolerant.

Explore the basic tool set provided by ExUnit and Mix to write and organize your test suite. Test code built around different OTP functionality. Isolate your code through dependency injection and by using Mox. Write comprehensive tests for Ecto projects, covering Ecto as a database tool as well as a standalone data validation tool. Test Phoenix channels from end to end, including authentication and joining topics. Write Phoenix controller tests and understand the concepts of integration testing in Elixir. Learn property-based testing with StreamData from the author who wrote the library.

Code with high confidence that you are getting the most out of your test suite, with the right tools that make testing your code a pleasure and a valuable part of your development cycle.

* * *

- Full details: [Search](https://pragprog.com/book/lmelixir/testing-elixir)
- View this book’s portal and details on how to post errata and suggestions [here](https://devtalk.com/books/testing-elixir).

_Don’t forget you can get 35% off with your Devtalk discount! Just use the coupon code “ **devtalk.com**" at checkout 👍_

---

<div class="post-metadata">

**Author:** ![AstonJ](https://forum.devtalk.com/user_avatar/forum.devtalk.com/astonj/32/7_2.png) [@AstonJ](https://forum.devtalk.com/u/AstonJ)\
**Post date:** [4 June 2020 14:16 UTC](https://forum.devtalk.com/t/testing-elixir-pragprog/672/2 "2020-06-04T14:16:11Z")

</div>

Nice to see another Elixir book!  
(And what a great choice of colour! 🤓)

---

<div class="post-metadata">

**Author:** ![tjstankus](https://forum.devtalk.com/user_avatar/forum.devtalk.com/tjstankus/32/212_2.png) [@tjstankus](https://forum.devtalk.com/u/tjstankus)\
**Post date:** [8 June 2020 19:57 UTC](https://forum.devtalk.com/t/testing-elixir-pragprog/672/3 "2020-06-08T19:57:56Z")

</div>

Looks like the PragProg site has been updated and the above link no longer works.

---

<div class="post-metadata">

**Author:** ![AstonJ](https://forum.devtalk.com/user_avatar/forum.devtalk.com/astonj/32/7_2.png) [@AstonJ](https://forum.devtalk.com/u/AstonJ)\
**Post date:** [8 June 2020 21:06 UTC](https://forum.devtalk.com/t/testing-elixir-pragprog/672/4 "2020-06-08T21:06:29Z")

</div>

I think it might be because it hasn’t been released in beta yet… hopefully one of the @PragmaticBookshelf crew will be able to shed some light on this 😃

---

<div class="post-metadata">

**Author:** ![PragmaticBookshelf](https://forum.devtalk.com/user_avatar/forum.devtalk.com/pragmaticbookshelf/32/463_2.png) [@PragmaticBookshelf](https://forum.devtalk.com/u/PragmaticBookshelf)\
**Post date:** [9 June 2020 01:01 UTC](https://forum.devtalk.com/t/testing-elixir-pragprog/672/5 "2020-06-09T01:01:13Z")

</div>

Yep, @AstonJ is right that it has to do with the book’s beta status, but there’s a bit more to it.

We were set to release _Testing Elixir_ last week on our normal Wednesday release schedule, but we used that slot to do something we felt was even more important given recent events in the U.S. We put the book on hold momentarily, and sent out this very special Letter from the Publisher instead [https://media.pragprog.com/newsletters/2020-06-03.html](https://media.pragprog.com/newsletters/2020-06-03.html)

Once the book is released in beta – which will be very, very soon – the link will take you to the book’s home on our new website.

---

<div class="post-metadata">

**Author:** ![idlehands](https://forum.devtalk.com/user_avatar/forum.devtalk.com/idlehands/32/725_2.png) [@idlehands](https://forum.devtalk.com/u/idlehands)\
**Post date:** [18 June 2020 18:31 UTC](https://forum.devtalk.com/t/testing-elixir-pragprog/672/6 "2020-06-18T18:31:01Z")

</div>

Pardon the self-promotion, but, @tjstankus and anyone else who’s been waiting, the beta is now out.

> **[Pragmatic Bookshelf: By Developers, For Developers](https://pragprog.com/titles/lmelixir/)**
>
> Write tests for your Elixir applications, including unit and integration tests for OTP-based modules, asynchronous code, Ecto-based modules and Phoenix projects.

---

<div class="post-metadata">

**Author:** ![mafinar](https://forum.devtalk.com/user_avatar/forum.devtalk.com/mafinar/32/723_2.png) [@mafinar](https://forum.devtalk.com/u/mafinar)\
**Post date:** [19 June 2020 19:27 UTC](https://forum.devtalk.com/t/testing-elixir-pragprog/672/7 "2020-06-19T19:27:02Z")

</div>

Just got the beta. Will start reading from tomorrow. ToC looks good.

---

<div class="post-metadata">

**Author:** ![gianthamster](https://forum.devtalk.com/letter_avatar_proxy/v4/letter/g/e68b1a/32.png) [@gianthamster](https://forum.devtalk.com/u/gianthamster)\
**Post date:** [2 November 2020 15:53 UTC](https://forum.devtalk.com/t/testing-elixir-pragprog/672/8 "2020-11-02T15:53:45Z")

</div>

How is everyone finding it so far? I’ve got a free ebook from PragProg coming to me and this one’s pretty high on my list.

---

<div class="post-metadata">

**Author:** ![jaeyson](https://forum.devtalk.com/user_avatar/forum.devtalk.com/jaeyson/32/6395_2.png) [@jaeyson](https://forum.devtalk.com/u/jaeyson)\
**Post date:** [5 January 2021 06:17 UTC](https://forum.devtalk.com/t/testing-elixir-pragprog/672/9 "2021-01-05T06:17:50Z")

</div>

Im still at ToC tho 🤣. Will start reading this over the weekend. First impression as a beginner: I’ll definitely get lots and lots of nuggets, especially fuzz, integration & end-to-end tests.
