[Webtest] Re: Maven + Canoo : BUILD FAILED Target `' does not exist in this project

Siegfried Göschl webtest@lists.canoo.com
Thu, 31 Jul 2003 19:26:18 +0200


Hi all,

within the Maven Canoo Webtest plugin I start a separate ANT process 
to execute Canoo WebTest (this is a design decision I'm currently 
rethinking - it stems from the fact that sometimes you are stuck to 
an older ANT version)

It seems that ANT running under UNIX/LINUX has a problem with an 
"empty" command line parameters such as ${maven.webtest.ant.options} 
since I don't have that problem on Windows 2000.

>>> SNIPPET >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

<java classname="org.apache.tools.ant.Main" fork="yes">         
   <arg value="${maven.webtest.ant.options}"/>           
   <arg value="-f"/> 
   <arg value="${testScriptFile}"/>
   <arg value="${maven.webtest.target}"/>
</java>

webtest:test:
    [echo] Starting Canoo Webtest ...
    [echo] Processing simpleTest.xml
    [java] Buildfile: /home/anjarivo/Projects/MEW/simpleTest.xml
    [java]
    [java] BUILD FAILED
    [java] Target `' does not exist in this project.
    [java]
    [java] Total time: 1 second
    [java] [ERROR] Java Result: 1
    [echo] Finished running Canoo Webtest Plugin

<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

According to Anjarivo it works if for ${maven.webtest.ant.options}  a 
value is set, e.g. "-v". I think the best solution is to check if a 
value is set for ${maven.webtest.ant.options} and to use two 
different invocation for the ANT process - one with  
${maven.webtest.ant.options}  and the other one without.

I try to check-in the patch tonight ....


Thanks,

Siegfried Goeschl


On 31 Jul 2003 at 16:52, anjarivo@free.fr wrote:

> Hi Siegfried,
> 
> Thank you for you help, I've managed in going further.
> Infortunatly, If I don't use "maven.webtest.ant.options=<any ant
> parameters>" it failed. I receive this error message.
> 
> webtest:test:
>     [echo] Starting Canoo Webtest ...
>     [echo] Processing simpleTest.xml
>     [java] Buildfile: /home/anjarivo/Projects/MEW/simpleTest.xml
>     [java]
>     [java] BUILD FAILED
>     [java] Target `' does not exist in this project.
>     [java]
>     [java] Total time: 1 second
>     [java] [ERROR] Java Result: 1
>     [echo] Finished running Canoo Webtest Plugin
> 
> But on the other side if I used "maven.webtest.ant.options=-v" it
> works.
> 
> webtest:test:
>     [echo] Starting Canoo Webtest ...
>     [echo] Processing simpleTest.xml
>     [java] Apache Ant version 1.5.1 compiled on October 2 2002
>     [java] Buildfile: /home/anjarivo/Projects/MEW/simpleTest.xml
>     [java] Detected Java version: 1.4 in: /usr/local/j2sdk1.4.2/jre
>     [java] Detected OS: Linux [java] parsing buildfile
>     /home/anjarivo/Projects/MEW/simpleTest.xml with 
> URI = file:/home/anjarivo/Projects/MEW/simpleTest.xml
>     [java] Project base dir set to: /home/anjarivo/Projects/MEW
>     [java] Build sequence for target `main' is [main]
>     [java] Complete build sequence is [main]
>     [java]
>     [java] main:
>     .........
> 
> I went over "plugin.jelly" in "maven-webtest-plugin-0.7.jar" and the
> Ant call seems correct. Do you have any idea ?
> 
> Regards,
> Anjarivo
> 
> 
> -----Message
> d'origine---------------------------------------------------------- De
> : Siegfried Goschl [mailto:siegfried.goeschl@it20one.at] Envoye :
> lundi 28 juillet 2003 21:55 A : anjarivo@free.fr Cc :
> siegfried.goeschl@it20one.at Objet : Re: Canoo Web Test and Maven ???
> 
> 
> Hi Anjarivo,
> 
> you are right - the webtest sample files are no longer part of the
> distribution and therefore "sample.xml" fails and the documentation
> was not updated ... :-(
> 
> Might be a good idea to add it again ...
> 
> +) You can download the sample from http://cvs.sourceforge.net/cgi-
> bin/viewcvs.cgi/maven-plugins/maven-plugins/webtest/webtest/
> 
> +) Place the sample.xml and config/sample.properties in a folder 
> "webtest"
> 
> +) If you are behind a firewall yo have to tweak the ANT script (ANT 
> 1.5.3 supports network proxies)
> 
> +) Run "maven webtest xdoc:trasnform" - it should work as shown below
> 
> Cheers,
> 
> Siegfried Goeschl
> 
> PS: Don't hesitate to post a success story ... :-)
> 
> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> 
> Microsoft Windows 2000 [Version 5.00.2195]
> (C) Copyright 1985-2000 Microsoft Corp.
> 
> C:\Dokumente und Einstellungen\sigi\.maven\plugins\maven-webtest-
> plugin-0.7>maven webtest
>  __  __
> |  \/  |__ _Apache__ ___
> | |\/| / _` \ V / -_) ' \  ~ intelligent projects ~
> |_|  |_\__,_|\_/\___|_||_|  v. 1.0-beta-10
> 
> webtest:
> webtest:clean:
>     [delete] Deleting 10 files from C:\Dokumente und 
> Einstellungen\sigi\.maven\plugins\maven-webtest-plugin-
> 0.7\target\webtest
>     [delete] Deleting 4 files from C:\Dokumente und 
> Einstellungen\sigi\.maven\plugins\maven-webtest-plugin-
> 0.7\target\webtest
>     [delete] Deleting: C:\Dokumente und 
> Einstellungen\sigi\.maven\plugins\maven-webtest-plugin-
> 0.7\target\webtest-raw-report.xml
> 
> webtest:info:
>     [echo]
>       maven.webtest.file                        = *.xml
>       maven.webtest.target                      =
>       maven.webtest.src                         = C:\Dokumente und
> Einstellungen\sigi\.maven\plugins\maven-webtest-plugin-0.7/webtest
> 
>       maven.webtest.config.host                 = localhost
>       maven.webtest.config.port                 = 80
>       maven.webtest.config.protocol             = http
>       maven.webtest.config.basepath             =
>       maven.webtest.config.summary              = true
>       maven.webtest.config.verbose              = true
>       maven.webtest.config.saveresponse         = true
>       maven.webtest.config.resultpath           = C:\Dokumente und
> Einstellungen\sigi\.maven\plugins\maven-webtest-plugin-
> 0.7/target/webtest
> 
>       maven.webtest.config.resultfile           =
>       maven.webtest.config.showhtmlparseroutput = true
> 
> 
> webtest:test:
>     [echo] Starting Canoo Webtest ...
>     [echo] Processing sample.xml
>     [java] Buildfile: C:\Dokumente und 
> Einstellungen\sigi\.maven\plugins\maven-webtest-plugin-
> 0.7\webtest\sample.xml
>     [java]
>     [java] AllTests:
>     [java]
>     [java] SimpleTest:
>     [java]  [testSpec] Rhino classes (js.jar) not found - Javascript
> disabled
>     [java]  [testSpec] At line 49, column 93: Bare ampersand found.
>     [java]  [testSpec] At line 53, column 106: Bare ampersand found.
>     [java]  [testSpec] At line 53, column 112: Bare ampersand found.
>     [java]  [testSpec] At line 49, column 93: Bare ampersand found.
>     [java]  [testSpec] At line 53, column 106: Bare ampersand found.
>     [java]  [testSpec] At line 53, column 112: Bare ampersand found.
>     [java] [java] MailingListTest: [java] [java] BogusTest: [java] 
>     [testSpec] At line 49, column 93: Bare ampersand found. [java] 
>     [testSpec] At line 53, column 106: Bare ampersand found. [java] 
>     [testSpec] At line 53, column 112: Bare ampersand found. [java]
>     [java] BUILD FAILED [java] 
> file:C:/Dokumente%20und%20Einstellungen/sigi/.maven/plugins/maven-
> webtest-plugin-0.7/webtest/sample.xml:169: Test failed.
>     [java] Test step clicklink named "Switch to a non-existing page"
> failed with message "Step "Switch to a non-existing page" (4/5): Link
> n ot found in page: <FooBar>"
>     [java]
>     [java] Total time: 25 seconds
>     [java] [ERROR] Java Result: 1
>     [echo] Finished running Canoo Webtest Plugin
> 
> webtest:generate-test-report:
>     [copy] Copying 10 files to C:\Dokumente und 
> Einstellungen\sigi\.maven\plugins\maven-webtest-plugin-
> 0.7\target\docs\webtest\response
>     [echo] Transforming TestSummary1-SimpleTest1.xml into XDOC ...
>     [echo] Transforming TestSummary2-SimpleTest2.xml into XDOC ...
>     [echo] Transforming TestSummary3-MailingListTest.xml into XDOC 
> ...
>     [echo] Transforming TestSummary4-BogusTest.xml into XDOC ...
> 
> webtest:generate-summary-report:
>     [echo] Summary
> BUILD SUCCESSFUL
> Total time:  29 seconds
> 
> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> 
> 
> On 28 Jul 2003 at 12:17, anjarivo@free.fr wrote:
> 
> > Hi,
> > 
> > I've been working on the integration of Canoo & Maven using your
> > plug-ins. If you use Canoo alone, it works fine, but I didn't manage
> > to reuse the previous project with Maven. Do you have any *fake*
> > project that can be used immediatly with you plug-in ? Even running
> > "samples" failed . If you go to the pluging directory and type
> > "maven webtest" I only received :
> > 
> > C:\maven\plugins>maven webtest
> >  __  __
> > |  \/  |__ _Apache__ ___
> > | |\/| / _` \ V / -_) ' \  ~ intelligent projects ~
> > |_|  |_\__,_|\_/\___|_||_|  v. 1.0-beta-10
> > 
> >    [delete] C:\maven\plugins\target\webtest not found.
> >    [delete] C:\maven\plugins\target\webtest not found.
> >      [echo]
> >      [echo]       maven.webtest.file                = *.xml
> >      [echo]       maven.webtest.target              =
> >      [echo]       maven.webtest.src                 = ./webtest
> > 
> >      [echo]       maven.webtest.config.host         = localhost
> >      [echo]       maven.webtest.config.port         = 80 [echo]     
> >       maven.webtest.config.protocol     = http [echo]      
> >      maven.webtest.config.basepath     = [echo]      
> >      maven.webtest.config.summary      = true [echo]      
> >      maven.webtest.config.verbose      = true [echo]      
> >      maven.webtest.config.saveresponse = true [echo]      
> >      maven.webtest.config.resultpath   = ./target/webtest [echo]    
> >        maven.webtest.config.resultfile   = [echo]     
> >      maven.webtest.jar.fileset.dir     = [echo]     
> >      maven.webtest.jar.fileset.include = [echo]     
> >      maven.webtest.jar.fileset.exclude = [echo]
> >     [mkdir] Created dir: C:\maven\plugins\target\webtest
> >      [echo] Starting Canoo Webtest ...
> > 
> > BUILD FAILED
> > File...... file:/C:/Documents and
> > Settings/zzz/.maven/plugins/maven-webtest-plug in-0.7/ Element...
> > j:forEach Line...... 95 Column.... 71 C:\maven\plugins\webtest not
> > found. Total time:  3 seconds	 
> > 
> > Thanks
> > 
> > Anjarivo
> > 
> > 
> > 
> > 
> > 
> 
> 
> 
> Siegfried Goeschl
> CTO
> =================================
> IT20one GmbH
> mail: siegfried.goeschl@it20one.at
> phone: +43-1-9900046
> fax: +43-1-52 37 888
> www.it20one.at
> 
>