Glad that helped.  I've updated the release notes on the Wiki with a note
about this, and am adding the same to the "building" section in the docs.

WILL

On 4/18/07, Supun Kamburugamuva <[EMAIL PROTECTED]> wrote:

Hi,

I have copied the Junit dll into the Ant lib directory and the problem
is solved. I have also added the "ant – compile" generated
TemplateTestBase to the source and now the tests are running ok.
Thanks for the help.

Cheers,
Supun.


On 4/17/07, Will Glass-Husain <[EMAIL PROTECTED]> wrote:
> Hi Supun,
>
> There's a couple of quirks here.  Here's what I think the issue sare:
>
> (1) Ant can't find the junit jar for the junit task.  That's because it
> doesn't look in the build classpath.  Solutions (a) Use ant 1.7 which
solves
> this problem or (b) copy junit.jar into the ant\lib library.
>
> Let us know if this helps.  If this solves the problem I'll add a note
to
> the documentation about this.
>
> (2) The test velocity files cannot be found.  The junit tests will not
run
> in an IDE without slight modifications.  The path to the test files is
added
> by an ant task.  Specifically, TemplateTestBase has constant fields
which
> define the path to the test files.  These have dummy values by default.
> When you run "ant compile" the entire source tree is copied to a
temporary
> location and these values are filled in with the current path.  (note to
> self: we really need to remove this annoying feature if possible).
>
> Again, two possible solutions.
> * Manually edit this class to include the path to your Velocity source
> tree.  Probably "." will work, though you might need an absolute
path.  This
> is the easiest approach, though we'll have to be careful not to commit
this.
>
> OR (this is what I do).
>
> * Run "ant compile" which will create the alternate source tree.  Then
> configure your IDE to use as the source tree (1) the standard java files
(2)
> the standard directory of java test files and (3) TemplateTestBase from
> bin/test-src  (which has the filled in paths).  Credit to Henning for
this
> workaround.
>
> WILL
>
>
> On 4/17/07, Supun Kamburugamuva <[EMAIL PROTECTED]> wrote:
> >
> > Hi,
> >
> > I got some problems while trying to run test cases.
> >
> > 1. When I try to run the tests using Ant build(ant test) I got the
> > following error.
> >
> > "Could not create task or type of type:  junit.  Ant could not find
> > the task or a class this task relies upon."
> >
> > I'm using ant-1.6.5.
> >
> > 2.  I have built an IntelliJ Idea project from the current SVN
> > checkout of the Velocity Engine. When I try to run some test cases I
> > got the following exception.
> >
> > "org.apache.velocity.exception.ResourceNotFoundException: Unable to
> > find resource 'context_safety.vm' "
> >
> > Same exception occurs for other test cases where external files are
> > required. Some test cases that don't use external files run correctly.
> >
> > Cheers,
> > Supun.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
> Forio Business Simulations
>
> Will Glass-Husain
> [EMAIL PROTECTED]
> www.forio.com
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Forio Business Simulations

Will Glass-Husain
[EMAIL PROTECTED]
www.forio.com

Reply via email to