Handling the inevitable — I

Vaishnavi Vadali
C# Programming
Published in
2 min readNov 15, 2020

Let’s face it, this is not a task any developer looks forward to. Writing code to test the functioning of my code? Like really?

More often than not, not writing unit test cases has led to retrospective meetings, where teams wondered how a particular scenario that could have been addressed ended as a bug. Result: More bugs on the board.

From the word go, architecture should be in accordance to test driven development. Be it in keeping it loosely coupled, choosing the right design pattern or adhering to SOLID principles, the ultimate goal should remain the same.

PC: Google

Writing test cases is not a tech debt, it is a task within the PBI. It is the developer’s responsibility to add or modify test cases inline with the code. It should also be a task within the build pipeline. Test cases fail, pipeline fails, build fails. No questions asked.

There are a lot of tools to generate unit test cases in the name of achieving code coverage. Some of them can be tweaked to suit the code and it’s set. But it is advised to understand the code flow and write test cases in accordance to the requirement. Test cases provide code coverage, not the other way around.

--

--

Vaishnavi Vadali
C# Programming

DotNet Cloud Developer | Fitness afficianado | Ambivert | Modern traditionalist | Potterhead for life