I wonder if there is any tool that automatically generates unit tests based on a method's pre- and post-conditions (and class invariant).
To be precise, suppose we are given pre- and post-conditions (and probably class invariant) for a method and we want to generate unit tests based on that information. I am looking for a practical tool for this purpose.
I know Korat and TestWizard. Could you please name a few more techniques/tools?
PS: Programming language, or the language using which we specify the method contracts, is not that important. I just want to know about the techniques.
Thank you.
Randoop does that. Its manual tells you how to specify pre- and post-conditions.
In a comment you made a distinction between "generating" and "guiding"; I'm not sure exactly what you mean by that, but you might view Randoop as using the specifications for guidance.