As the challenge changes, so the tools

My preparation for the ongoing Andela bootcamp exposed me to some software engineering tools I’ve never encountered before. I encountered so many tools as a participant in the ongoing bootcamp but two of those tools particularly stood out for me. nyc and Istanbuljs.

The name of those tools alone sounded weird to me initially, Istanbul is a city in present day Turkey while nyc could be interpreted as a acronym for New York City, those were the thoughts on my mind when I came across those tools but obviously, it’s not what it sounds like. Istanbuljs is a code coverage analysis script you run when executing unit test and nyc is a command line interface that runs it.

What does Istanbuljs really do? Istanbul presents some decent HTML reports which can tell which code is covered and the part that is not covered. It attaches line counters so that you can track how well your unit tests exercise your code base. Istanbuljs is a pure JavaScript library.

Since Istanbuljs analyzes code coverage, so what is code coverage? According to Wikipedia, Code coverage is a measure used to describe the degree to which the source code of a program is executed when a particular test suite runs. To make it more subtle, Code coverage is a technique which determines whether our test cases are actually covering the application code and how much code is exercised when we run those test cases. It also uncovers unnecessary lines of code and the ones that require additional testing.

Finally, the ongoing Andela bootcamp exposed me to a lot of tools I never knew about like eslint, TravisCI, CodeClimate, Coveralls etc. Istanbuljs and nyc’s weird names intrigued me but most importantly, they are great tools which shows executed lines of code and also, the redundant ones. It saves time for Software engineers. Having 100% code coverage is a plus on our code base, most especially testable codes.