small medium large xlarge

23 Mar 2017, 12:51 (1 post)

Contents don’t mention the subject of Elixir testing. Are you sure there’s nothing to add about the how, when, where, and what of Elixir testing?

29 Mar 2017, 01:09
Lance Halvorsen (43 posts)

Thanks for your question. I do think testing is important, so I’d like to address this.

I’ll tell you a secret. I started writing this book in a full-on TDD style. I quickly realized that the testing was taking over the focus of the book, and I had to re-write what I had already done without tests to get it back on track.

There will be an appendix pointing readers toward resources for testing. And to give you a forthright answer, I don’t think I would have anything groundbreaking to add to what is already available.

17 Apr 2017, 02:31
Arvind Dhiman (3 posts)

I finished chapter 3 and felt a need to understand the code I had written following the book so far. I started writing unit tests.

My tests are here:

03 May 2017, 14:55
Dan McHarness (7 posts)

Thanks Arvind,

I finished the first cut of Coordinate in chapter 2 and was feeling the need to get a handle on Elixir unit tests.

12 Aug 2017, 00:10
Gary Fleshman (1 post)

Thoroughly enjoying the non-ORM treatment in Ch.2.

But, I find the reliance on iex to illustrate return values as a missed opportunity to build a foundation of unit tests underneath the domain model. Reading code in an eBook is fine, but line after line of iex output dilutes the major points that are being presented.

Reminds me of this over-used proverb: “give a man a fish and you feed him for a day; teach a man to fish and you feed him for a lifetime”

xlated: “give a man an [iex result] and you feed him for a day; teach a man to [write a test] and you feed him for a lifetime”

16 Nov 2017, 18:17
Christopher Eyre (2 posts)

Unit tests would have helped with some of the sample code. Especially the long iex sessions at the end of chapter 3. I had successfully entered all the code but had messed up some of the testing code until it went into unit tests.

17 Dec 2017, 10:48
George Mantzouranis (4 posts)

For what is worth, I find your book to be the best resource for elixir out there. In my opinion, if you went on with the tdd style, it might take the focus at the beginning, but it would win big time later on, especially when you need to enter all these commands on iex. Also, we would have a full context (no pun intended) on how a professional elixir developer builds software from the ground up. I know this would be important to me, I guess I would not be alone. Have in mind that what is out there regarding tests and ExUnit, is not as good as it should be. Sure we can find information on ExUnit, but there is no good all in one guide out there.

You must be logged in to comment