ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Reilly" <>
Subject Re: How to send a data from ant to JUnit class?
Date Fri, 04 Aug 2006 08:18:19 GMT
An example:
<junit ...>
                    <propertyref prefix="test"/>
                    <propertyref prefix="build"/>
                <sysproperty key="root" file="${basedir}"/>

This sets the system property root to the basedir
and copies the properties begining with test and build to
corresponding system properties.


On 8/3/06, Vishal Vishnoi <> wrote:
> Use sysproperty nested element in
> In Java access
> them using System.getProperty
> --Vishal
> ahehheh wrote:
> >Hi, i am now working with ant to test several Junit classes.
> >One of Junit classes is Log In command, and this uses a specific id and
> >password to connect to database.
> >(Basically i am testing the connection function)
> >But my manager wants me to put these id and password values into a
> >properties file.
> >So when user runs ant(buildall.xml), these id and password values will be
> >sent to the test class, and the test class use these values to connect to
> >database.
> >My question is that:
> >is it possible to sent a value from ant to test class?
> >My manager mentioned <input> function, but it doesn't help me much.
> >Can anyone please help me?
> >Thanks in advance :)
> >
> >
> _______________________________________________________________________
> 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:
> For additional commands, e-mail:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message