Is there any tool or Eclipse plugin to generate unit test cases automatically for a particular Java class?


Any tool to do this will only generate a skeleton test class. You'll have to fill in the tests.

I like the functionality of the "MoreUnit" Eclipse plugin, although I very rarely use the test case generation feature. The ability to quickly jump back and forth between the test class and the code under test is more important for me.

MoreUnit is aware of mocking frameworks like Mockito, so it will generate some of the details you need, based on what you've specified in the creation dialog.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.