aiiterator

View on GitHub
8 October 2018

test coverage

by johan jordaan

to cover or not to cover

i am a big supporter of 100% test coverage. i don’t believe you can trust any code (especially javascript) that has not been executed. i see coverage as a very basic syntax validation step, what my compiler would have done for me. so my work flow as been to write some test and then to write the code and to repeat this process until i have 100% coverage, or explicitly excluded code from the coverage. the problem with this approach is that i tend to fall into a cycle of making micro changes on the module i am working on. this leads to me not focusing on the bigger picture and what i am wanting to deliver. so although i am a supported of extensive tests and coverage, sometimes it is good to write just enough test code for the main flow and then to add the full coverage for all the edge cases later.

back

tags: testing - ramblings - blog