@joaoevangelista
I would vote for:
- use ex_unit tests for testing your code. ( then you can refactor easy)
- add coverage tool: GitHub - parroty/excoveralls: Coverage report tool for Elixir with coveralls.io integration. · GitHub for spotting uncovered zones.
( to be safe: codecoverage run code but it’s up to human to have the right tests
meaning you can run code without really testing it sometimes. All coverage tools need also to be reviewed by humans, but they are incredibly awesome ) - use Typespecs and dialyzer for automating ( see book ref at the end for this)
- for doc coverage : GitHub - rrrene/inch_ex: Provides a Mix task that gives you hints where to improve your inline docs. · GitHub
- from my personal pov and experience:
when do unit_test focus on public interface tests. Don’t test private function to much because this will change . The public function should not change much, so you need to test this good, and if you test public you test private function that compose your public function/module.
this is needed when you want to spare cost maintenance of tests.
If you do this i think you can refractor with confidence
I would also suggest you the great book Search , it adress your question and more . ( i’m currently reading and i really like it
)






















