|
|
|
|
|
by GuB-42
110 days ago
|
|
> The much more likely scenario is that the code is right, but a mistake in the test leads it to not test anything. What I usually do to prevent this situation is to write a passing test, then modify the code to make it fail, then revert the change. It also gives an occasion to read the code again, kind of like a review. I have never seen this practice formalized though, good for me, this is the kind of things I do because I care, turning it into a process with Jira and such is a good way to make me stop caring. |
|
Isn't that what is oft known as mutation testing? It is formalized to the point that we have automation to do the mutation for you automatically.