Eclipse JUnit test class issues

J

Jarrick Chagma

If I build a JUnit test class for a particular class and then later add
methods to the class being tested, is there any way to automatically
generate test methods in the test class for the new methods? It looks like
this has to be done manually.

Also, it would be nice if there was some way to validate a test class to
ensure that all public methods are being tested. Can this be done now in
Eclipse Galileo?
 
M

Markus Eberle

Jarrick said:
If I build a JUnit test class for a particular class and then later add
methods to the class being tested, is there any way to automatically
generate test methods in the test class for the new methods? It looks like
this has to be done manually.

At least in Eclipse you can do a "New -> New JUnit Test ...". Then you
get a wizard and on the second page you can select all methods you want
to test. This will create test methods for these methods.
Also, it would be nice if there was some way to validate a test class to
ensure that all public methods are being tested. Can this be done now
in Eclipse Galileo?

I think the plugin http://moreunit.sourceforge.net/ can do that.

Cheers,
Markus
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top