Hey Eric - long time no talk :)

You can easily wrap the running of an Ant build file inside a JUnit test
case.  As a matter of fact, most of Ant's own test cases do this.  Check out
BuildFileTest in Ant's source code and see how it runs unit tests. We are
likely going to include Ant's testing pieces in the Ant 1.5 distribution so
that folks writing custom Ant tasks can benefit from the test case framework
we use to test built-in Ant tasks.

    Erik


----- Original Message -----
From: "Eric Pugh" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, April 16, 2002 8:36 AM
Subject: RE: Interest in Adding Canoo as a component test of Maven?


> I didn't realize that Canoo
> (http://webtest.canoo.com/webtest/manual/WebTestHome.html) wasn't a more
> popular tool!  I looked at Latka, and Canoo is similar, but seems to have
> more features.  Basically it exposes as an Ant script a whole bunch of
http
> requests/responses (similar to latka), but at a much higher level..
> Slightly off topic, but to run a script to go to a page, verify a title,
> click a button, and then verify links, you add these bits to your ant
file.
>
> <steps>
> <invoke stepid="main page"
> url="${start.page}"
> save="Menu"/>
> <verifytitle stepid="main page reached"
> text="Kinase Profiler Main Menu"
> regex="true"/>
>
> <clickbutton stepid="Submit the link to Workorder list page"
>    label="WORKORDER (list)" />
>
> <verifylinks stepid="Check all links on List Workorder"/>
> </steps>
>
> In regards to running a webtest tool, you are right that I shouldn't have
to
> change the CSS scripts etc..  I went and looked at the build file, and the
> default canoo test.xml file that is run by ant referernces everything
> relative from the local path, so it seemed easier to put everything in a
> relative to my web app location.  I may change it to put it all in
something
> like maven/templates/canoo and change the references from local relative
> references to relative to maven home.
>
> I will look at how cactus runs tests..  My problem with Canoo's method of
> running tests is that they are part of an ant script..  And the processing
> of all the raw .xml data is done via xsl from the ant scripts.
> And I don't want to hack up the Maven ant scripts, but I guess I can to
> integrate canoo.  Or, I can try and create some sort of adapter the way
> Latka works to run the ant script from inside a JUNIT test.
>
> If you have some samples of running latka you don't mind sharing, I would
> love to see it.
>
> Eric
>
>
>
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Monday, April 15, 2002 9:04 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Interest in Adding Canoo as a component test of Maven?
>
>
> I've got no idea what Canoo is....
>
> But biased opinion follows....
>
> "Eric Pugh" <[EMAIL PROTECTED]> wrote on 16/04/2002 02:47:14 AM:
>
> > Hi all,
> >
> > I have been using Canoo quite successfully to run tests for my website
> that
> > I am using Maven to build.  What is annoying is that when I run the
> > maven:test target I don't run as well the Canoo web tests script.  Also,
> If Canoo is some web testing tool like Latka ( see
> http://jakarta.apache.org/commons/latka ), then it should have a bridge to
> allow it's web test scripts to be run via JUnit....If it's got an ant
> task, just put that in your build file.
>
> > everytime I create a new web app, I have to copy all the various .css
> and
> > .xsl stylesheets into the webapp, which means the updating my webapps
> for a
> > new version of Canoo is labor intensive.
> If Canoo is a testing tool, why does it change your webapp - shouldn't the
> app be testable without changes?
>
> > I would like to add Canoo as another optional test to maven, and put all
> the
> > stylesheets etc in the java/maven/stylesheets directory or possibly a
> > java/maven/stylesheets/canoo directory.  Is this something that would be
> of
> > interest to other people for inclusion in the main CVS source?
> >
> > I think that running a Canoo script should be something specified in
> your
> > POM.
> Ok, here I disagree. There's already a spot for integration tests in the
> POM, admittedly via cactus, but I don't see what canoo would add to the
> model of a project - why not just update the build-tests.xml file and set
> some properties....I've been able to use maven:test to run web tests with
> Latka with no change to the POM....
>
> > Eric
> --
> dIon Gillard, Multitask Consulting
> Work:      http://www.multitask.com.au
> Developers: http://adslgateway.multitask.com.au/developers
>
>

Reply via email to