[Webtest] New to webtest, but pretty classical install problem
Marc Guillemot
webtest@lists.canoo.com
Fri, 02 Apr 2004 18:21:53 +0200
log4j must find the log4j.properties, therefore it must be in the classpath.
Add something like
<pathelement path="C:\Documents and Settings\flet\Bureau\Java\canoo\lib"/>
to your classpath definition.
Marc.
Francois LETELLIER wrote:
> At 17:40 02/04/2004, Marc Guillemot wrote:
>
>> I've tested what you provided and it works just fine (my version of
>> webtest is modified, but this should have no impact for this problem).
>> What about providing log4j config file in the classpath to see the
>> error logged?
>
>
> Ant says:
> "Buildfile: installTest.xml
>
> main:
> [testSpec] log4j:WARN No appenders could be found for logger
> (com.meterware.httpunit.HttpWebResponse).
> [testSpec] log4j:WARN Please initialize the log4j system properly.
>
> BUILD FAILED
> [...]"
>
> The log4j.properties contains:
>
> log4j.rootCategory=info, stdout
> log4j.logger.com.canoo.webtest.steps.request=debug, stdout
> log4j.appender.stdout=org.apache.log4j.ConsoleAppender
> log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
> log4j.appender.stdout.layout.ConversionPattern=%5p (%F:%L) - %m%n
>
> Is it what you asked for ?
>
>
>
>> Marc.
>>
>>
>> Francois LETELLIER wrote:
>>
>>> At 16:40 02/04/2004, Marc Guillemot wrote:
>>>
>>>> Other information:
>>>> the problem doesn't come from the script you have provided but from
>>>> C:\Documents and
>>>> Settings\flet\Bureau\Java\canoo\doc\samples\installTest.xml:19. May
>>>> you have started an other test as the one you wanted to?
>>>
>>>
>>> Well, actually the content of the file is the one I copied below --
>>> it's NOT the original installTest.xml ; I modified it. By the way,
>>> the original installTest throws the same exception...
>>>
>>>> Marc.
>>>>
>>>> Francois LETELLIER wrote:
>>>>
>>>>> Hi,
>>>>> I'm new to webtest and will probably ask a boring "newbie
>>>>> question". i'm sorry about that :)
>>>>> Config: Win XP ; Ant 1.6.1 ; JDK 1.4.2 ; Canoo WebTest Build
>>>>> number 432
>>>>> When trying the basic example (source below), I get an "unexpected
>>>>> exception caught" error message...
>>>>>
>>>>> Trace:
>>>>> Exception raised: com.canoo.webtest.engine.StepExecutionException:
>>>>> Unexpected ex
>>>>> ception caught: java.io.EOFException, Step: InvokePage at
>>>>> C:\Documents and Setti
>>>>> ngs\flet\Bureau\Java\canoo\doc\samples\installTest.xml:19: with
>>>>> (stepId="get in
>>>>> dex Page", url="index.html",
>>>>> stepType="invoke")com.canoo.webtest.engine.StepExec
>>>>> utionException: Unexpected exception caught: java.io.EOFException,
>>>>> Step: InvokeP
>>>>> age at C:\Documents and
>>>>> Settings\flet\Bureau\Java\canoo\doc\samples\installTest.
>>>>> xml:19: with (stepId="get index Page", url="index.html",
>>>>> stepType="invoke")
>>>>> at
>>>>> com.canoo.webtest.steps.Step.handleUnexpectedException(Step.java:334)
>>>>> at
>>>>> com.canoo.webtest.steps.request.Target.protectedGoto(Target.java:115)
>>>>> at
>>>>> com.canoo.webtest.steps.request.Target.gotoTarget(Target.java:153)
>>>>> at
>>>>> com.canoo.webtest.steps.request.InvokePage.doExecute(InvokePage.java:37)
>>>>>
>>>>> at com.canoo.webtest.steps.Step.execute(Step.java:99)
>>>>> at
>>>>> com.canoo.webtest.engine.Engine.executeSteps(Engine.java:26)
>>>>> at
>>>>> com.canoo.webtest.ant.TestSpecificationTask.execute(TestSpecification
>>>>> Task.java:68)
>>>>> at
>>>>> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
>>>>> at org.apache.tools.ant.Task.perform(Task.java:364)
>>>>> at org.apache.tools.ant.Target.execute(Target.java:301)
>>>>> at org.apache.tools.ant.Target.performTasks(Target.java:328)
>>>>> at
>>>>> org.apache.tools.ant.Project.executeTarget(Project.java:1215)
>>>>> at
>>>>> org.apache.tools.ant.Project.executeTargets(Project.java:1063)
>>>>> at org.apache.tools.ant.Main.runBuild(Main.java:632)
>>>>> at org.apache.tools.ant.Main.startAnt(Main.java:183)
>>>>> at org.apache.tools.ant.launch.Launcher.run(Launcher.java:197)
>>>>> at org.apache.tools.ant.launch.Launcher.main(Launcher.java:56)
>>>>> Here's my test file:
>>>>> <project name="SimpleTest" basedir="." default="main">
>>>>> <taskdef file="C:\Documents and
>>>>> Settings\flet\Bureau\Java\canoo\webtestTaskdefs.properties">
>>>>> <classpath>
>>>>> <fileset dir="C:\Documents and
>>>>> Settings\flet\Bureau\Java\canoo" includes="**/lib/*.jar"/>
>>>>> </classpath>
>>>>> </taskdef>
>>>>> <target name="main">
>>>>> <testSpec name="myTest">
>>>>> <config
>>>>> host="www.sun.com"
>>>>> port="80"
>>>>> protocol="http"
>>>>> basepath="/" />
>>>>> <steps>
>>>>> <invoke
>>>>> stepid="get index Page"
>>>>> url="index.html" />
>>>>> </steps>
>>>>> </testSpec>
>>>>> </target>
>>>>> </project>
>>>>>
>>>>> Hint anybody ?
>>>>> Thanks,
>>>>>
>>>>> François LETELLIER
>>>>> INRIA Rhône-Alpes - ObjectWeb Consortium Executive Committee
>>>>> email: francois.letellier at objectweb.org - phone: +33 (0)6 84 64
>>>>> 00 24
>>>>> http://www.objectweb.org - ObjectWeb middleware : provide your
>>>>> applications with the kind of freedom they deserve !
>>>>> _______________________________________________
>>>>> WebTest mailing list
>>>>> WebTest@lists.canoo.com
>>>>> http://lists.canoo.com/mailman/listinfo/webtest
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> WebTest mailing list
>>>> WebTest@lists.canoo.com
>>>> http://lists.canoo.com/mailman/listinfo/webtest
>>>
>>>
>>> François LETELLIER
>>> INRIA Rhône-Alpes - ObjectWeb Consortium Executive Committee
>>> email: francois.letellier at objectweb.org - phone: +33 (0)6 84 64 00 24
>>> http://www.objectweb.org - ObjectWeb middleware : provide your
>>> applications with the kind of freedom they deserve !
>>> _______________________________________________
>>> WebTest mailing list
>>> WebTest@lists.canoo.com
>>> http://lists.canoo.com/mailman/listinfo/webtest
>>
>>
>>
>> _______________________________________________
>> WebTest mailing list
>> WebTest@lists.canoo.com
>> http://lists.canoo.com/mailman/listinfo/webtest
>
>
> François LETELLIER
> INRIA Rhône-Alpes - ObjectWeb Consortium Executive Committee
> email: francois.letellier at objectweb.org - phone: +33 (0)6 84 64 00 24
> http://www.objectweb.org - ObjectWeb middleware : provide your
> applications with the kind of freedom they deserve !
>
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest
>
>