The AntUnit documentation says:
"Each test target is run in a fresh Ant project; i.e.
each test target has a fresh set of properties and
references." But if I have test targets:
<target name="testFoo">
<property name="foo" value="foo" />
<au:assertTrue message="$${foo}=${foo}">
<equals arg1="${foo}" arg2="foo" />
</au:assertTrue>
</target>
<target name="testBar">
<property name="foo" value="bar" />
<au:assertTrue message="$${foo}=${foo}">
<equals arg1="${foo}" arg2="bar" />
</au:assertTrue>
</target>
one will fail, as I would expect given that the
AntUnit code uses a single Project instance to run all
targets.
The fun part: if we change the behavior to suit the
documentation, the utility of beforeTests/afterTests
is pretty much reduced to filesystem artifacts. I
would choose to correct the documentation to describe
the actual behavior, and see if we can't get scoped
properties working (minus the memory leaks) for Ant
1.7.1-1.8 , to alleviate the discomfort of having to
choose new properties for every test (see the apply
testcase in core).
Thoughts?
-Matt
--- Matt Benson <gudnabrsam@yahoo.com> wrote:
> JUnit 4 and TestNG have a Before/AfterClass concept
> for expensive setup/tearDown applicable to most or
> all
> of a test class. AntUnit needs something similar;
> e.g. before/after[File|Build|Resource|All]... I
> think
> it's useful to retain the before/after nomenclature
> for familiarity bred from JUnit 4 and TestNG use in
> the community. I will implement as
> before/AfterFile;
> if folk have issues we can discuss a better idiom.
>
> -Matt
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam
> protection around
> http://mail.yahoo.com
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> dev-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> dev-help@ant.apache.org
>
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org
|