DEV Community

Discussion on: What are your biggest problems with unit testing?

Collapse
 
sinewalker profile image
Mike Lockhart • Edited

I know what unit testing is, why I should do it. This has been harped over a billion times, so don't start with that. Also don't tie it in with TDD, or CI/CD. Unit testing is more broadly applicable than these and I don't need a new way of thinking about programming.

I want a scientific method of programming

I want to know where to start. Which of the 3 different frameworks for <language of choice> should I use? How do I construct a test. What's mocking, why do we mock rather than test actual data? Can I use unit testing to guard against regressions? What's a good strategy?

Collapse
 
alexbunardzic profile image
Alex Bunardzic • Edited

I recommend you start here: opensource.com/article/19/10/test-...

then work your way backwards by clicking on the link to the previous article. The series covers unit testing, TDD and mutation testing pretty thoroughly, and adds a lot of scientific explanation to the proceedings.