[Webtest] [webtest][JIRA] Created: (WT-296) Uncaught exception: org.apache.commons.httpclient.NoHttpResponseException

michal (JIRA) michal (JIRA)" <noreply@canoo.com
Sun, 1 Apr 2007 19:49:28 +0200 (CEST)


Uncaught exception: org.apache.commons.httpclient.NoHttpResponseException
-------------------------------------------------------------------------

         Key: WT-296
         URL: http://webtest-community.canoo.com/jira/browse/WT-296
     Project: WebTest
        Type: Bug

    Versions: 2.1    
 Environment: Linux hostname 2.6.17-1.2142_FC4smp #1 SMP Tue Jul 11 22:57:02 EDT 2006 i686 i686 i386 GNU/Linux
java version "1.4.2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2)
Classic VM (build 1.4.2, J2RE 1.4.2 IBM build cxia32142ifx-20060209 (SR4-1) (JIT enabled: jitc))

- tested on Webtest 2.1, latest snapshot(R_1537) and latest svn snapshot (revision 25937)
- webserver is on localhost
    Reporter: michal


I copied includes/commonVerification.xml and altered it a bit:

<group description="Link integrity check">
	<verifyLinkedContent
		xpath="/html/head/link[@rel='stylesheet']/@href"
		accept="text/css"
		/>
	<verifyLinkedContent
		xpath="//img/@src"
		accept="image/*"
		/>
	<verifyLinkedContent
		xpath="/html/head/link[contains(@rel, 'icon')]/@href"
		accept="image/*"
		/>
	<verifyLinkedContent
		description="Show how to handle alternative mime-types"
		xpath="//script/@src"
		accept="text/javascript;application/x-javascript"
		/>
	<verifyxpath
		description="No empty anchor"
		xpath="not(//a[not(*) and not(text())])"
		/>
	<verifyText
		description="Check for ending &lt;/html&gt; tag"
		text="&lt;/html&gt;"
		/>
</group>

95% of time this commonVerification.xml runs just fine, but the rest 5% I'm getting error on the first step (text/css). Even if I removed first step, the error has just happened on //img/@src which became first step.

The error is as follows:
Message

org.apache.commons.httpclient.NoHttpResponseException
Location

(line: )
Exception

java.lang.ClassCastException
Hide Stacktrace

java.lang.ClassCastException: org.apache.commons.httpclient.NoHttpResponseException
	at com.canoo.webtest.steps.AbstractStepContainer.executeContainedStep(AbstractStepContainer.java:79)
	at com.canoo.webtest.steps.AbstractStepContainer.executeContainedSteps(AbstractStepContainer.java:91)
	at com.canoo.webtest.steps.control.GroupStep.doExecute(GroupStep.java:14)
	at com.canoo.webtest.steps.Step.execute(Step.java:104)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
	at org.apache.tools.ant.Task.perform(Task.java:364)
	at com.canoo.webtest.ant.TestStepSequence.executeSteps(TestStepSequence.java:43)
	at com.canoo.webtest.ant.TestStepSequence.doExecute(TestStepSequence.java:31)
	at com.canoo.webtest.steps.Step.execute(Step.java:104)
	at org.apache.tools.ant.Task.perform(Task.java:364)
	at com.canoo.webtest.ant.WebtestTask.execute(WebtestTask.java:164)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
	at org.apache.tools.ant.Task.perform(Task.java:364)
	at org.apache.tools.ant.Target.execute(Target.java:341)
	at org.apache.tools.ant.Target.performTasks(Target.java:369)
	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
	at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:37)
	at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
	at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382)
	at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
	at org.apache.tools.ant.Task.perform(Task.java:364)
	at org.apache.tools.ant.Target.execute(Target.java:341)
	at org.apache.tools.ant.Target.performTasks(Target.java:369)
	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
	at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:37)
	at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
	at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382)
	at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
	at org.apache.tools.ant.Task.perform(Task.java:364)
	at org.apache.tools.ant.Target.execute(Target.java:341)
	at org.apache.tools.ant.Target.performTasks(Target.java:369)
	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
	at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:37)
	at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
	at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
	at org.apache.tools.ant.Task.perform(Task.java:364)
	at org.apache.tools.ant.Target.execute(Target.java:341)
	at org.apache.tools.ant.Target.performTasks(Target.java:369)
	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
	at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:37)
	at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
	at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
	at org.apache.tools.ant.Task.perform(Task.java:364)
	at org.apache.tools.ant.Target.execute(Target.java:341)
	at org.apache.tools.ant.Target.performTasks(Target.java:369)
	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
	at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:37)
	at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
	at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382)
	at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
	at org.apache.tools.ant.Task.perform(Task.java:364)
	at org.apache.tools.ant.Target.execute(Target.java:341)
	at org.apache.tools.ant.Target.performTasks(Target.java:369)
	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
	at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
	at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
	at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
	at org.apache.tools.ant.Main.runBuild(Main.java:668)
	at org.apache.tools.ant.Main.startAnt(Main.java:187)
	at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
	at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)


Without any changes this happens on 5% of the tests.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://webtest-community.canoo.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira