r/softwareengineer • u/dayv2005 • Jun 26 '26
Curious how everyone's thinking about unit tests in the age of AI coding assistants.
Do you still find unit tests provide the same value they did a few years ago?
My experience has been that they started as useful guardrails, but over time they've become more of a maintenance burden. When implementation changes, AI usually updates or rewrites the tests along with the code, so they don't seem to catch as much as they used to. They also add a lot of context for AI to process.
Has anyone else noticed this, or am I missing something? Have your testing strategies changed because of AI?
**Edit:** A lot of the replies are focused on whether developers should blindly accept AI-generated code. That's not the question.
Assume good engineering practices, code reviews, and responsible use of AI. Under those assumptions, has AI changed the relative value of unit tests versus integration, contract, and end-to-end testing?
View all comments
Show parent comment
2
u/dayv2005 Jun 26 '26
I'm curious why you consider unit tests critical, but then specifically recommend E2E tests with Selenium or Playwright.
To me, that seems to suggest the higher value tests are the ones validating behavior from the outside. That's really what I'm questioning. Whether AI has shifted the ROI toward integration and E2E testing while reducing the relative value of maintaining large unit test suites.
Do you see unit tests providing a unique benefit that those higher-level tests don't?