Fl4m3Ph03n1x
Good Elixir TDD resources?
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 look forward towards my next endeavor - testing.
Why testing?
Due to the nature of my work, I do TDD, which is of huge help to me. In my new job using Elixir I can see that TDD also is a good fit for the company and for it’s projects so now I need a way to learn on how to do TDD with Elixir.
What am I looking for?
I am looking for a book, a video course or any set of resources that can teach me how to do TDD the Elixir way. Paying is not an issue as long as it falls bellow the 20 euros mark ( or 25 dollars ).
You guys know this community and its resources the best, what would you recommend?
Most Liked
idlehands
Andrea Leopardi and I are currently writing a book on testing elixir for PragProg. While it does not emphasize TDD, I’m a strict test-driver. I’m not sure what resources need to be dedicated specifically to TDD if you are already familiar with the concepts from another language.
Let me know how I can help and I’m happy to. I do not know of any specific guides or posts.
kokolegorille
You also have ExUnit Official Documentation to start with.
I do not know a book dedicated to TDD in Elixir, but testing is not an issue for me, it’s more like a pleasure after using RSpec/Rails. It’s really damn fast. You don’t even have time to get a coffee while running the full tests ![]()
But You need to test different things, like macro testing, OTP testing (You can assert that a process has/has not being called).
Others resources You might find useful.
- There is a dedicated testing chapter in Mastering Elixir (Self-published / Packt)
- It covers all sort of scenario… mocks/or not, channels testing, macro testing etc.
- If You want to test with Phoenix, You have Programming Phoenix (Pragprog) which includes tests.
- The same goes for GraphQL and it’s related book Craft GraphQL APIs in Elixir with Absinthe (Pragprog).
You might ping @peerreynders for a wise advice on the subject.
peerreynders
I’m not exactly sure what you are expecting.
GOTO 2015 • Agile is Dead • Pragmatic Dave Thomas:
(I seem to recall that he stated of typically having about 60% test coverage.)
Anyway - TDD is a practice and if you have a competent testing framework like ExUnit you should be good to go - what other language specific support do you expect? And thanks to the Erlang community there is PropEr to replace some tedious static test cases.
Keep in mind that any practice should not be taken to the extreme of religion or dogma - that is counter-productive.
Practice TDD when it makes sense but keep in mind that it is just as important to delete those tests once they taught you all they can so that you don’t have to pay the cost of maintaining them (and don’t make the mistake of skipping Refactor in: Red, Green, Refactor - Why Refactor? - Economics).
DevTernity 2017: Ian Cooper - TDD, Where Did It All Go Wrong
Popular in Chat/Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #hex









