Jtest useful in eXtreme programming?

LegacyForumLegacyForum Posts: 1,669 ✭✭
edited December 2016 in Jtest
How do I make it useful?

We write all our Junit tests before actually writing the method implementations. This is following the eXtreme Programming paradigm.

How can Jtest be useful in this situation?


Since the method actually has to exist before the junit test (but the method body can be empty and return some known value) and you should know the specification for the method, then we suggest you use a mixture of Design By Contract and Junit (eXtreme Programming) tests along with Jtest.

You could use DbC to express in the method's javadoc itself what the methods do and how to use them. This way the info is right in the method and it appears in the method's documentation. Some cases may be to complicated to express in DbC, but most should be ok. So you should use a mixture, maybe still write unit tests, but move part of the specification to the DbC.

Continuing to use Jtest, DbC and Junit throughout the maturing of the project, will be the most stable, solid and best way to build an application. If it is only done with Junit, then the project will not be as solid as it could have been had you used Jtest and DbC from the beginning.
Sign In or Register to comment.