Any Improvement for Java TDD?
Viewer Discretion Advised: Java-rated!
Back when I was at Cognizant, there was a serious push for TDD (Test-Driven Development). As any developer knows, TDD can be a little… awkward. Painful, even. Now that I’m on my “extended non-paid PTO,” I took some time to dig into how TDD could be improved, especially with Java and Spring Boot. I’ve come up with a solution in a developer way that not only makes testing easier but also helps with quick debugging. Here’s what I found:
1. Unit Testing Success, Spring Boot Struggles
My approach works perfectly for unit testing, but Spring Boot brings its own set of challenges. Dependency Injection doesn’t always play nice, often leading to those classic NullPointerExceptions. I’m still working on a fix—if I crack it, it’ll be a game-changer 😉 .
2. Looking for a “TDD .gitignore”
I wish there were an easy way to mark test-related code to be excluded when building in DEV, QA, and production environments. Some kind of .gitignore for test code would keep the clutter down and streamline the workflow.
Stay tuned—I’m close to refining this approach, and I’ll share updates once I have a breakthrough. Happy coding 😃 !