Submit and vote on feature ideas.

Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

Jtest useful in eXtreme programming?

LegacyForum
LegacyForum Posts: 1,664 ✭✭
edited December 2016 in Jtest
How do I make it useful?
Question:

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?

Answer:

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.
Tagged:

Tagged