4 messages in com.canoo.lists.webtestRe: [Webtest] how to check out specif...
FromSent OnAttachments
Marco Neri15 Dec 2004 20:33 
Marc Guillemot16 Dec 2004 02:17 
Denis N. Antonioli16 Dec 2004 06:15 
Ian Wallace17 Dec 2004 16:56 
Subject:Re: [Webtest] how to check out specific build number versions?
From:Ian Wallace (iwal@eforceglobal.com)
Date:12/17/2004 04:56:47 PM
List:com.canoo.lists.webtest

On Thu, 2004-12-16 at 07:16, Denis N. Antonioli wrote:

Hi

On Thu, 16 Dec 2004, Marc Guillemot wrote:

At the moment I check out from head and use compile.plain to build and avoid clover issues that other people are referring to. what is the best way to do it? based on what i read in other people's posts are editing out references to clover in build.xml and using the full target?

this needs to be improved. It's not an acceptable situation that user have to
modify locally build.xml to be able to compile.

I agree that building webtest from scratch should work without modification. That's why the cvs module contains every single dependencies and its own servlet container ;-)

I agree that the CVS module has everything there that's needed to compile.

The blessed way to build webtest now is to check out the complete cvs module
[1], set up the class path to contain the junit and clover jar files that are in lib/build [2] and to call ant [3]. Of course, the user must provide his/her own ant installation...

[1] Take care to check out the module in such a way that the files are
read/write, otherwise the build may fail generating the dtd. [2] A simple way is to copy the two jar files to $ANT_HOME/lib, of course. [3] Impatient users may call ant develop and skip the generation of the documentation and various zip and war files for the build server.

1) I've checked out the module from cvs 2) I've added the clover.jar to the CLASSPATH (which appears to be a zip file in with a JAR extension - at least that's what 'jar tvf clover.jar' reports) NOTE: I actually had to add ./lib as well so that the log4j.properties file could be found during the build otherwise I get:

checkWebTest: [echo] base dir is /home/iwallace/workspace/webtest/doc/samples [testSpec] log4j:WARN No appenders could be found for logger (com.canoo.webtest.steps.Step). [testSpec] log4j:WARN Please initialize the log4j system properly.

from installTest.xml.

The build still bombs out though part way through with the installTest.xml b/c you've got to fiddle with the server.properties file to set the correct path (I'm trying to work around that). I guess, initially it's just hard to get a handle of exactly all the steps that are happening in the build (it's a bit complicated). I was very happey to see that everything is contained in repository - that was big plus.

I'm currently still learning the build process so I can't make any recommendations on how to improve things right now.

BTW we could remove the dependency on server.properties from build.xml by merely passing in the 'webtest.home' param to the installTest.xml ant call. I've tried out this:

<target name="installTest"> <ant antfile="installTest.xml" dir="${basedir}/doc/samples"> <property name="webtest.home" value="${basedir}"/> </ant> </target>

Which appears to work correctly for the installTest.xml build file.

Question for everyone: Has anyone had success with the functional tests in the Jetty server? Mine never complete and I always get a message:

functionalTest:

isSelftestServerAlreadyRunning:

stopSelftestServer:

start: [java] 17:35:46.366 EVENT Checking Resource aliases [java] 17:35:49.086 EVENT Starting Jetty/4.2.22 [java] 17:35:49.698 WARN!! Delete existing temp dir /tmp/Jetty__9090__selftest for
WebApplicationContext[/selftest,jar:file:/home/iwallace/workspace/webtest/jetty/webapps/selftest.war!/] [java] 17:35:50.330 EVENT Started WebApplicationContext[/selftest,Selftest] [java] 17:35:50.795 EVENT Started SocketListener on 0.0.0.0:9090 [java] 17:35:50.796 EVENT Started org.mortbay.jetty.Server@147c5fc [java] Buildfile: build.xml [java] Java Result: 1

stop: [java] 17:36:35.207 EVENT Shutdown hook executing [java] 17:36:35.209 EVENT Stopping Acceptor ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=9090] [java] 17:36:35.214 EVENT Stopped SocketListener on 0.0.0.0:9090 [java] 17:36:35.220 EVENT Stopped WebApplicationContext[/selftest,Selftest] [java] 17:36:35.221 EVENT Stopped org.mortbay.jetty.Server@147c5fc [copy] Copying 1 file to /home/iwallace/workspace/webtest

BUILD FAILED /home/iwallace/workspace/webtest/build.xml:217: The following error occurred while executing this line: /home/iwallace/workspace/webtest/build.xml:296: The selftests failed!

I just didn't know if I was missing something obvious here.

cheers ian

How would a better way looks like?

Best dna