In our JUnit testsuite, I have spotted a few tests that do not drive up coverage, and thus should be removed (they take time but does not really add value to the test suite).
I was wondering what tools exist that can spot redundant tests for me?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I’d consider this a misuse of the code coverage metric. Just because a test doesn’t increase the metric, it is not necessarily redundant – it could test a specific execution path that consists of LOC that are covered by several other tests together, but represents behaviour that none of the other tests cover. And remember: code behaviour is influenced very much by state, but no test coverage tool I know measures the coverage of state space.
Unless the runtime of your test suite is a serious problem, there are much better things you can do with your time than eliminate possibly redundant tests.