I'm like a test unitarian. Unit tests? Great. Integration tests? Awesome. End to end tests? If you're into that kind of thing, go for it. Coverage of lines of code doesn't matter. Coverage of critical business functions does. I think TDD can be a cult, but writing software that way for a little bit is a good training exercise.
I'm a senior engineer at a small startup. We need to move fast, ship new stuff fast, and get things moving. We've got CICD running mocked unit tests, integration tests, and end to end tests, with patterns and tooling for each.
I have support from the CTO in getting more testing in, and I'm able to use testing to cover bugs and regressions, and there's solid testing on a few critical user path features. However, I get resistance from the team on getting enough testing to prevent regressions going forward.
The resistance is usually along lines like:
You shouldn't have to refactor to test something
We shouldn't use mocks, only integration testing works.
Repeat for test types N and M
We can't test yet, we're going to make changes soon.
How can I convince the team that the tools available to them will help, and will improve their productivity and cut down time having to firefight?
Small idea: "AI" tools can write simple tests for a given function or class. I don't blindly endorse these tools nor is it a complete solution, but the time save might convince a reluctant developer.
I've had the most success patiently arguing the value of tests over time (years). When a bug would've been caught by a test, mention it. When someone would've moved faster with a test, say something. I haven't found "I'm right, let me convince you" pushes to be very effective.
I've had some luck at using AI to get over the hump of the first "does this component work" test - it's easy to detect stuff that needs to be mocked and put in stub mocks using GPT. GPT is horrible at writing good tests, but often it's harder to write that first one than the meaningful tests.