Feature Requests item #592214, was opened at 2002-08-07 18:01
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=438938&aid=592214&group_id=44253
Category: Other
Group: Large (> 1 pair-month)
Status: Open
Priority: 5
Submitted By: Charles Reis (csreis)
Assigned to: Nobody/Anonymous (nobody)
Summary: Generate Test Case from Class
Initial Comment:
(This is essentially the inverse of Feature Request
525996.)
For beginning students with no Java experience, it
could be very useful to be able to automatically
generate a simple test case class given an existing
class. The process would involve displaying some sort
of dialog which would allow users to specify sample
inputs and expected outputs for any non-private method
in the class being tested. (Strings and other
primitives wouldn't be a problem; perhaps for objects
users could just enter the appropriate code as if in
the Interactions pane.) DrJava would then generate
code for the test case using several test methods which
each called assertEquals.
We wouldn't care about making this TOO robust, because
once students get some experience, they should learn to
write the test cases themselves. But this sort of tool
would allow teachers to introduce unit testing from the
very beginning, without having to explain any of the
details needed for writing a test (eg. import
statements, inheritence, public, etc). And as long as
the tool also put in some reasonable comments, it could
be an example of good coding style, as well.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=438938&aid=592214&group_id=44253
|