Navdeep Singh
1 min readApr 27, 2018

--

Spaghetti code is one of the main reasons why we structure our code to closely flow alon with test cases. While writing code we need to keep in mind the SOLID principles so that our test cases can clearly define the piece of functionality that they are written for.

In addition, breaking test cases is a good thing as far as TDD is concerned since it gives a sense of direction in two ways, one: we are building new things and two: our test cases are a critical part of our code.

We are not interested in writing test cases that don’t break when we change the functionality associated directly to them.

Another thing comes to mind when we thing about writing tests. That is usability of the test targets and how justified are they. That’s where mutation testing comes in handy. “Testing the test cases to see if they serve the purpose in a code base or if they are just increasing LOCs”.

Always an interesting topic to discuss🙂

--

--

Navdeep Singh
Navdeep Singh

Written by Navdeep Singh

Author of Reactive programming with Swift, Engineering Manager — Exploring possibilities with new Tech.

No responses yet