Questions about unit tests

Posted by ngugeneral@reddit | ExperiencedDevs | View on Reddit | 58 comments

For each company I have worked before Unit Tests coverage was either optional (Startups) or had solid QA department, so I never had to bother maintain them up myself. This has introduced a gap in my professional knowledge.

Now, recently I have joined a small team where I am given enough freedom (kinda Lead position), so for the next quarter I am planning put in order the test coverage.

Question #1: what is the purpose/advantage of test coverage? From what I understand - compability of new features with existing ones. As well - early tracking of new bugs. What else am I missing?

Question #2: in my case there are no existing coverage, so I am looking into tools for scaffolding tests. Stack is .Net, so first thing I looked into was Generation of Tests with Visual Studio Enterprise (or similar with JetBeains). The last time I was doing that was like 8 years ago and the quality of the generated tests was questionable (which is expectable and one can't avoid "polishing"). How are things now? I have a feeling that AI tools can apply here just perfectly, is there any you can recommend?