ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vladimir Egorov" <vego...@bea.com>
Subject RE: AntUnit tests need fully-qualified names
Date Thu, 23 Feb 2006 18:08:30 GMT
Stefan, thanks for your reply. Yes, printing the build file makes things
clear for an isolated run. But if you want to compare runs across
various systems, you need a fully-qualified test name that does not
depend on the system. The absolute path to build file depends on the
system.

In JUnit, the fully-qualified class name does not depend on the system.

As AntUnit does great job so far mapping JUnit to Ant, it would be nice
to have a mapping for the fully-qualified class name. Since Ant does not
have a concept of classpath or package, one approach is using relative
path to the build file, rather then absolute path.

Say, my AntUnit file (the one that has test targets) is located at

/local/path/to/antunittests/samples/Test.au.xml

I am running AntUnit on it using

<antunit>
  <fileset dir="/local/path/to/antunittests/">
    <include name="**/*.au.xml"/>
  </fileset>
</antunit>

Then my build file is named "samples/Test.au.xml". This name does not
depend on the system.

Vladimir

P.S. I don't see any problem with separating (relative path to) build
file and target name.

-----Original Message-----
From: Stefan Bodewig [mailto:bodewig@apache.org] 
Sent: Wednesday, February 22, 2006 9:16 PM
To: user@ant.apache.org
Subject: Re: AntUnit tests need fully-qualified names

On Wed, 22 Feb 2006, Vladimir Egorov <vegorov@bea.com> wrote:

> The plainlistener that comes with AntUnit uses test target names as
> results names.

The plainlistener is more or less just a proof of concept.  When I put
it together I needed someting to quickly show to myself that AntUnit
really did what it was supposed to.

> Since two or more build files can define target named testFoo, this
> can lead to naming conflicts.

It does print the build file prior to listing the targets, doesn't it?


> Although one can write a custom AntUnit listener, it would be nice
> to standardize on the "fully-qualified" test target naming. Is there
> any plan or discussion of this?

None yet.

The current implementation matches what Ant does in the JUnit case, we
separate between test class name and test name, both in the plain text
and the XML listeners.  Given that we don't have any XML listener in
AntUnit yet, I'd expect us to list build file and target there as
well.

How would you want to create the fully qualified name (what would it
look like)?  Why do you think it would be better than separating the
information on build file and target?

Cheers

        Stefan

[Vladimir] 

_______________________________________________________________________
Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message