I've been a full-stack developer for about a year now, and I'm facing some resistance on my team regarding unit tests. I dedicate a good amount of my time—about 1-2 workdays a sprint—to writing meaningful unit tests that cover my features. Recently, my coworker and I were tasked with refactoring a library that had been in development without any tests. I suggested we create a test suite before deploying to production, but I was met with ridicule. Comments like "we don't need those" and "the juice isn't worth the squeeze" have me feeling frustrated and questioning my sanity. Why does it seem like I'm the only one pushing for quality code? What do you all think about this situation?
5 Answers
You might want to consider finding a new team or even a new job if this behavior continues. Being in an environment that undervalues unit testing could hamper your growth as a developer. There are plenty of places that prioritize quality and good engineering practices.
It sounds like you're caught in an unfortunate situation where trying to maintain high code quality is being mocked. What you can do is quietly continue to uphold your coding standards. If something goes wrong in production in the future, use that as an opportunity to highlight how proper testing could have mitigated those issues.
Exactly! Just keep track of any bugs that slip through now, and when the dust settles, you can point back to your testing efforts to show the value by comparing your quality against theirs.
I would say that unit tests are important for catching regressions and ensuring code quality. The ridicule you're facing might be a sign of their own insecurities. Keep doing your thing and maybe consider showing them the benefits through examples of how your tests have prevented bugs in the past. Sometimes data speaks louder than words.
Yeah, and you might find that after a few bugs slip through, they begin to understand the importance of what you're trying to implement.
In my experience, teams that resist testing often do it out of fear of change or simply because they're used to a certain way of doing things. Just remember that the industry trend is towards better software practices, so don't lose hope! Find allies in your company and try advocating for testing one small step at a time.
Very true! You might find others who feel the same way you do but haven’t spoken up yet. It’s worth having those conversations!
Honestly, it sounds like you're in a pretty toxic environment. If the team isn't committed to running or maintaining the tests, then they're more of a liability than an asset. Tests only truly help if the entire team is on board with using them and taking them seriously. I think you should keep writing your tests for your own sanity, but don’t expect the whole team to come around.
I agree! It's tough to change the culture of a team that doesn't see the value in testing. At my last job, it took a few major production mishaps before we all realized that having decent tests is crucial.
Absolutely! It's worth it to work somewhere that aligns with your coding values. Life is too short to deal with peers who have a 'whatever works' attitude toward software quality.