It's all about the answers!

Ask a question

Is there a way to require a unit test is added for each file


Bob Patten (1154) | asked Mar 16 '10, 10:08 a.m.
I would like to require that when a file is checked in that there is a corresponding unit test also checked in (or that it exists).
Is there a pre-existing rule for this? Or if not, has anyone created one?

One answer



permanent link
Jan Wloka (4161) | answered Mar 17 '10, 4:44 a.m.
JAZZ DEVELOPER
On Tue, 16 Mar 2010 15:23:02 +0100, bpatten
<wrpatten> wrote:

Hi there,

we have a process advisor "Require JUnit Test Run" that can be bound to
deliver operations. It can be configured to require a run of a specific
test suite for a project area, team, stream (e.g., the maintenance stream)
and even an iteration. It can prevent the delivery of changes into a
stream if the associated test suite did not run and all tests passed. The
advisor, however, does not take coverage information or file-to-test
associations into account.

In workitem 93846 we're discussing the introduction of change-based
coverage to JUnit test runs. A change coverage process advisor could for
example enforce a full test coverage of all changes delivered to a
(maintenance) stream. If you're interested, add a description of your use
case to that workitem.

Thanks,
Jan.



https://jazz.net/jazz/resource/itemName/com.ibm.team.workitem.WorkItem/93846


I would like to require that when a file is checked in that there is a
corresponding unit test also checked in (or that it exists).
Is there a pre-existing rule for this? Or if not, has anyone created
one?


--
Jan Wloka
Jazz Work Item Team

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.