You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Kashyap Parikh <kp...@upromise.com> on 2002/08/30 16:11:42 UTC

Adding a key value tag to test task

Hi,

JunitReport task creates one html file for every junit class. So if I run
same class twice in my test then it overwrites the first file. I would like
to add a key,value tag called suffix to <test> that will append to the junit
test name. For example:
<junit printsummary="withOutAndErr" fork="yes">
	<formatter type="xml"/>
	<classpath path="${classpath}"/>
	<test name="com.dove.tools.ActionSmoke" toDir="./Jreport"
suffix="First"/>
</junit>

Will create an xml report and will have a test name=ActionSmokeFirst.

Can someone tell me whats the best way to change the src. I looked into
JUnitTest.java and JUnitTask.java and have added this variable. But I assume
execute.java also needs to be modified.

Thanks,
Kashyap


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Adding a key value tag to test task

Posted by Stefan Bodewig <bo...@apache.org>.
On Fri, 30 Aug 2002, Kashyap Parikh <kp...@upromise.com> wrote:

> I would like to add a key,value tag called suffix to <test> that
> will append to the junit test name.

You have complete control over the file name via <test>'s outfile
attribute.

> Can someone tell me whats the best way to change the src. I looked
> into JUnitTest.java and JUnitTask.java and have added this
> variable.

Should be sufficient.

> But I assume execute.java also needs to be modified.

Why?

Stefan

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>