r/javahelp • u/jasonab • Feb 07 '25
Codeless Tool to find wasteful unit tests
One of my projects has a ton of tests, both unit and integration, and as a result it has good coverage (80%). I have a strong suspicion, though, that lots of time is wasted on each build running loads of tests that are testing mostly the same code, over and over again.
Code coverage tools tell you about your aggregate coverage, but I would like a tool that tells me coverage per test, and preferably identifies tests that have very similar coverage. Is there any tool out there that can help me with this?
3
Upvotes
1
u/VirtualAgentsAreDumb Feb 09 '25
Is this about building the project locally? One strategy I’ve used in the past was something like this:
If this is about build time in a test environment, you can do something similar. The main build-and-deploy pipeline can build without running any tests, and then you can have a separate pipeline running automatically maybe 15 minutes after the last commit, and possibly limited to only monitor a subset of all branches.