DEV Community

Discussion on: How YOU can Learn Mock testing in .NET Core and C# with Moq

Collapse
 
quooston profile image
Quooston

Respect! I sadly feel that many people these days have been lead astray, and think that unit/integration/acceptance testing is for some reason not worth the trouble. It's terrible how the industry does this, and that there are not enough thought leaders out there that push things back in the right direction. I sincerely appreciate that you are doing your bit.

Myself and my teams have been exclusively TDDing since about 2008. Most of what we do is green-fields regulated medical software, and the tests are the only way to get the confidence and evidence required to prove that we aren't going to present a hazard to a patient. If you write the correct tests, you have objective evidence that what you have created works exactly as expected.

But, in order to do this, planning needs to line up. Planning needs to produce the structured inputs that tests require. Or at least the inspiration for what the tests require. If you plan correctly, it's easy to identify high value tests and drive implementation with those. But most environments can't even do any kind of agile process with any real success, and therefore things come undone. I believe that this is one big reason why testing has suffered. Having acceptance criteria for core features as a result of sprint planning makes writing the associated tests incredibly easy, and produces more robust software.

I have empirical evidence of this, there is no discussion here! Opinions to the contrary are uninformed and a symptom of environments finding it too difficult to put the pieces together (process and testing standards) to make this happen with success.

Anyway, enough rambling. Great post, thank you.