Andres Vargas - zodman

How Testing Code Without Unittest

In my professional career, I was working with multiple projects already started. Although there are two cases what I remember.

Once was, a project from a big brand of soda drink in JS. It has unit test with 30% of coverage (only backend). Even though nobody was maintaining or updating it. At that point of the unit test was obsolete.

Other project the unit test own 60% of coverage, well maintained, but stuck in there. They weren’t enabled to increase the coverage in the way, of the big modules owns a lot of complex reducer/selector making it; hard to build new unit test.

The first time when I was in that situation, I create an automation script with selenium; Also I had implemented the happy path, what covers main use cases. With the team, I started to retake the unit test and refactor the project.

In such manner, the selenium script was a guard to guarantee the code doesn’t affect the project execution.

The results start showing. We increase the unit test to get 70% coverage. It was a big achievement. Some test cases changed because the project have features obsoleted.

#Coding