[Webtest] HTTP error 302

John and Pip John and Pip" <pipandjohn@gmail.com
Fri, 17 Nov 2006 10:02:15 +1300


------=_Part_20468_11620552.1163710935188
Content-Type: text/plain; charset=WINDOWS-1252; format=flowed
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Hi,

I have a test that is failing to follow a 302 error. I've searched the
archives and played around trying to enable redirects but nothing seems to
work.

Below is the stripped-down test (just one invoke) and the output. This is a
publicly available page so you can hit
https://flightbookings.airnewzealand.co.nz/isbook_en_NZ/book/initSearchForF=
lights.dofrom
either IE or Firefox so I'm hoping someone can help me figure out how
to hit this page from WebTest! Note that I've tried an internal page that i=
s
http rather than https and get the same problem so it isn't related to SSL.

I am using Java 1.5.0.6, HTMLUnit 1.10 and WebTest R_1393 (I think! How can
I verify this?).

Regards,

        John

<?xml version=3D"1.0"?>

<!DOCTYPE project SYSTEM "WebTest.dtd">

<project name=3D"OLH" basedir=3D"." default=3D"main">

    <property name=3D"webtest.home" location=3D"..\.."/>

    <import file=3D"${webtest.home}/lib/taskdef.xml"/>

    <target name=3D"main">

            <webtest name=3D"ISIS SFF NZ Search">

                        <steps>

                                                <invoke description=3D"ISIS
SFF NZ search page" url=3D"
https://flightbookings.airnewzealand.co.nz/isbook_en_NZ/book/initSearchForF=
lights.do"
/>

                                    </steps>

                        </webtest>

            </target>

</project>



Here is the output:



<?xml version=3D"1.0" encoding=3D"UTF-8"?>

<summary Implementation-Title=3D"Canoo Webtest"
Implementation-Version=3D"R_1389">

    <testresult endtime=3D"Fri Nov 17 09:25:42 NZDT 2006"

        location=3D"F:\WebTest\doc\ISIS\tempTest.xml:7: " starttime=3D"Fri =
Nov
17 09:25:40 NZDT 2006"

        successful=3D"no" testspecname=3D"ISIS SFF NZ Search">

        <config>

            [snipped because I give the full URL below =96 get same result =
if
set up config properly including port 443]

        </config>

        <results>

            <step>

                <parameter name=3D"description" value=3D"ISIS SFF NZ search
page"/>

                <parameter name=3D"method" value=3D"GET"/>

                <parameter name=3D"resultFilename"
value=3D"response_1163708742276_invoke.html"/>

                <parameter name=3D"taskName" value=3D"invoke"/>

                <parameter name=3D"url" value=3D"
https://flightbookings.airnewzealand.co.nz/isbook_en_NZ/book/initSearchForF=
lights.do
"/>

                <result>

                    <failed duration=3D"1469"/>

                </result>

                <htmlparser>

                    <error col=3D"1" line=3D"1" url=3D"
https://flightbookings.airnewzealand.co.nz/isbook_en_NZ/book/initSearchForF=
lights.do">Empty
document.</error>

                </htmlparser>

            </step>

            <failure message=3D"com.canoo.webtest.engine.StepFailedExceptio=
n:
Step[invoke &quot;ISIS SFF NZ search page&quot; (1/1)]: HTTP error 302, at:
invoke, Step: InvokePage at F:\WebTest\doc\ISIS\tempTest.xml:9:  with
(description=3D&quot;ISIS SFF NZ search page&quot;, method=3D&quot;GET&quot=
;,
resultFilename=3D&quot;response_1163708742276_invoke.html&quot;,
taskName=3D&quot;invoke&quot;,
url=3D&quot;https://flightbookings.airnewzealand.co.nz/isbook_en_NZ/book/in=
itSearchForFlights.do&quot;)"/>

        </results>

    </testresult>

</summary>

------=_Part_20468_11620552.1163710935188
Content-Type: text/html; charset=WINDOWS-1252
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

<div class=3D"Section1">
<p class=3D"MsoNormal"><font face=3D"Times New Roman" size=3D"3"><span styl=
e=3D"font-size: 12pt;">Hi,<br><br>I have a test that is failing to follow a=
 302=20
error. I've searched the archives and played around trying to enable redire=
cts=20
but nothing seems to work. </span></font></p>



<p class=3D"MsoNormal"><font face=3D"Times New Roman" size=3D"3"><span styl=
e=3D"font-size: 12pt;">Below is the stripped-down test (just one invoke) an=
d=20
the output. This is a publicly available page so you can hit </span></font>=
<font face=3D"Arial" size=3D"2"><span style=3D"font-size: 10pt; font-family=
: Arial;"><a href=3D"https://flightbookings.airnewzealand.co.nz/isbook_en_N=
Z/book/initSearchForFlights.do">
https://flightbookings.airnewzealand.co.nz/isbook_en_NZ/book/initSearchForF=
lights.do</a></span></font>=20
from either IE or Firefox so I'm hoping someone can help me figure out how =
to=20
hit this page from WebTest! Note that I've tried an internal page that is h=
ttp rather than https and get the same problem so it isn't related to SSL. =
<br></p><p class=3D"MsoNormal">I am using Java <a href=3D"http://1.5.0.6">
1.5.0.6</a>, HTMLUnit 1.10 and WebTest R_1393 (I think! How can I verify th=
is?).<br></p><p class=3D"MsoNormal"><font face=3D"Times New Roman" size=3D"=
3"><span style=3D"font-size: 12pt;">Regards,</span></font></p>
<p class=3D"MsoNormal"><font face=3D"Times New Roman" size=3D"3"><span styl=
e=3D"font-size: 12pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; John<br><=
br>&lt;?xml=20
version=3D&quot;1.0&quot;?&gt;</span></font></p>
<p class=3D"MsoNormal"><font face=3D"Times New Roman" size=3D"3"><span styl=
e=3D"font-size: 12pt;">&lt;!DOCTYPE project SYSTEM=20
&quot;WebTest.dtd&quot;&gt;</span></font></p>
<p class=3D"MsoNormal"><font face=3D"Times New Roman" size=3D"3"><span styl=
e=3D"font-size: 12pt;">&lt;project name=3D&quot;OLH&quot; basedir=3D&quot;.=
&quot;=20
default=3D&quot;main&quot;&gt;</span></font></p>
<p class=3D"MsoNormal"><font face=3D"Times New Roman" size=3D"3"><span styl=
e=3D"font-size: 12pt;">&nbsp;&nbsp;&nbsp; &lt;property name=3D&quot;webtest=
.home&quot;=20
location=3D&quot;..\..&quot;/&gt;</span></font></p>
<p class=3D"MsoNormal"><font face=3D"Times New Roman" size=3D"3"><span styl=
e=3D"font-size: 12pt;">&nbsp;&nbsp;&nbsp; &lt;import=20
file=3D&quot;${webtest.home}/lib/taskdef.xml&quot;/&gt;</span></font></p>
<p class=3D"MsoNormal"><font face=3D"Times New Roman" size=3D"3"><span styl=
e=3D"font-size: 12pt;">&nbsp;&nbsp;&nbsp; &lt;target=20
name=3D&quot;main&quot;&gt;</span></font></p>
<p class=3D"MsoNormal"><font face=3D"Times New Roman" size=3D"3"><span styl=
e=3D"font-size: 12pt;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp; &lt;webtest name=3D&quot;ISIS SFF NZ=20
Search&quot;&gt;</span></font></p>
<p class=3D"MsoNormal"><font face=3D"Times New Roman" size=3D"3"><span styl=
e=3D"font-size: 12pt;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;=20
&lt;steps&gt;</span></font></p>
<p class=3D"MsoNormal"><font face=3D"Times New Roman" size=3D"3"><span styl=
e=3D"font-size: 12pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;=20
&lt;invoke description=3D&quot;ISIS SFF NZ search page&quot;=20
url=3D&quot;<a href=3D"https://flightbookings.airnewzealand.co.nz/isbook_en=
_NZ/book/initSearchForFlights.do">https://flightbookings.airnewzealand.co.n=
z/isbook_en_NZ/book/initSearchForFlights.do</a>&quot;=20
/&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
</span></font></p>
<p class=3D"MsoNormal"><font face=3D"Times New Roman" size=3D"3"><span styl=
e=3D"font-size: 12pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;=20
&lt;/steps&gt;</span></font></p>
<p class=3D"MsoNormal"><font face=3D"Times New Roman" size=3D"3"><span styl=
e=3D"font-size: 12pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;=20
&lt;/webtest&gt;</span></font></p>
<p class=3D"MsoNormal"><font face=3D"Times New Roman" size=3D"3"><span styl=
e=3D"font-size: 12pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp; &lt;/target&gt;</span></font></p>
<p class=3D"MsoNormal"><font face=3D"Times New Roman" size=3D"3"><span styl=
e=3D"font-size: 12pt;">&lt;/project&gt;</span></font></p>
<p class=3D"MsoNormal"><font face=3D"Times New Roman" size=3D"3"><span styl=
e=3D"font-size: 12pt;">&nbsp;</span></font></p>
<p class=3D"MsoNormal"><font face=3D"Times New Roman" size=3D"3"><span styl=
e=3D"font-size: 12pt;">Here is the output:</span></font></p>
<p class=3D"MsoNormal"><font face=3D"Times New Roman" size=3D"3"><span styl=
e=3D"font-size: 12pt;">&nbsp;</span></font></p>
<p class=3D"MsoNormal"><font face=3D"Arial" size=3D"2"><span style=3D"font-=
size: 10pt; font-family: Arial;">&lt;?xml version=3D&quot;1.0&quot;=20
encoding=3D&quot;UTF-8&quot;?&gt;</span></font></p>
<p class=3D"MsoNormal"><font face=3D"Arial" size=3D"2"><span style=3D"font-=
size: 10pt; font-family: Arial;">&lt;summary=20
Implementation-Title=3D&quot;Canoo Webtest&quot;=20
Implementation-Version=3D&quot;R_1389&quot;&gt;</span></font></p>
<p class=3D"MsoNormal"><font face=3D"Arial" size=3D"2"><span style=3D"font-=
size: 10pt; font-family: Arial;">&nbsp;&nbsp;&nbsp; &lt;testresult endtime=
=3D&quot;Fri Nov=20
17 09:25:42 NZDT 2006&quot;</span></font></p>
<p class=3D"MsoNormal"><font face=3D"Arial" size=3D"2"><span style=3D"font-=
size: 10pt; font-family: Arial;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
=20
location=3D&quot;F:\WebTest\doc\ISIS\tempTest.xml:7: &quot; starttime=3D&qu=
ot;Fri Nov 17 09:25:40=20
NZDT 2006&quot;</span></font></p>
<p class=3D"MsoNormal"><font face=3D"Arial" size=3D"2"><span style=3D"font-=
size: 10pt; font-family: Arial;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
 successful=3D&quot;no&quot;=20
testspecname=3D&quot;ISIS SFF NZ Search&quot;&gt;</span></font></p>
<p class=3D"MsoNormal"><font face=3D"Arial" size=3D"2"><span style=3D"font-=
size: 10pt; font-family: Arial;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
=20
&lt;config&gt;</span></font></p>
<p class=3D"MsoNormal"><font face=3D"Arial" size=3D"2"><span style=3D"font-=
size: 10pt; font-family: Arial;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp; [snipped because I give=20
the full URL below =96 get same result if set up config properly including =
port=20
443]</span></font></p>
<p class=3D"MsoNormal"><font face=3D"Arial" size=3D"2"><span style=3D"font-=
size: 10pt; font-family: Arial;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
=20
&lt;/config&gt;</span></font></p>
<p class=3D"MsoNormal"><font face=3D"Arial" size=3D"2"><span style=3D"font-=
size: 10pt; font-family: Arial;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
=20
&lt;results&gt;</span></font></p>
<p class=3D"MsoNormal"><font face=3D"Arial" size=3D"2"><span style=3D"font-=
size: 10pt; font-family: Arial;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;=20
&lt;step&gt;</span></font></p>
<p class=3D"MsoNormal"><font face=3D"Arial" size=3D"2"><span style=3D"font-=
size: 10pt; font-family: Arial;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;parameter=20
name=3D&quot;description&quot; value=3D&quot;ISIS SFF NZ search=20
page&quot;/&gt;</span></font></p>
<p class=3D"MsoNormal"><font face=3D"Arial" size=3D"2"><span style=3D"font-=
size: 10pt; font-family: Arial;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;parameter=20
name=3D&quot;method&quot; value=3D&quot;GET&quot;/&gt;</span></font></p>
<p class=3D"MsoNormal"><font face=3D"Arial" size=3D"2"><span style=3D"font-=
size: 10pt; font-family: Arial;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;parameter=20
name=3D&quot;resultFilename&quot;=20
value=3D&quot;response_1163708742276_invoke.html&quot;/&gt;</span></font></=
p>
<p class=3D"MsoNormal"><font face=3D"Arial" size=3D"2"><span style=3D"font-=
size: 10pt; font-family: Arial;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;parameter=20
name=3D&quot;taskName&quot; value=3D&quot;invoke&quot;/&gt;</span></font></=
p>
<p class=3D"MsoNormal"><font face=3D"Arial" size=3D"2"><span style=3D"font-=
size: 10pt; font-family: Arial;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;parameter=20
name=3D&quot;url&quot;=20
value=3D&quot;<a href=3D"https://flightbookings.airnewzealand.co.nz/isbook_=
en_NZ/book/initSearchForFlights.do">https://flightbookings.airnewzealand.co=
.nz/isbook_en_NZ/book/initSearchForFlights.do</a>&quot;/&gt;</span></font>
</p>
<p class=3D"MsoNormal"><font face=3D"Arial" size=3D"2"><span style=3D"font-=
size: 10pt; font-family: Arial;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
&lt;result&gt;</span></font></p>
<p class=3D"MsoNormal"><font face=3D"Arial" size=3D"2"><span style=3D"font-=
size: 10pt; font-family: Arial;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &l=
t;failed=20
duration=3D&quot;1469&quot;/&gt;</span></font></p>
<p class=3D"MsoNormal"><font face=3D"Arial" size=3D"2"><span style=3D"font-=
size: 10pt; font-family: Arial;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
&lt;/result&gt;</span></font></p>
<p class=3D"MsoNormal"><font face=3D"Arial" size=3D"2"><span style=3D"font-=
size: 10pt; font-family: Arial;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
&lt;htmlparser&gt;</span></font></p>
<p class=3D"MsoNormal"><font face=3D"Arial" size=3D"2"><span style=3D"font-=
size: 10pt; font-family: Arial;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &l=
t;error=20
col=3D&quot;1&quot; line=3D&quot;1&quot;=20
url=3D&quot;<a href=3D"https://flightbookings.airnewzealand.co.nz/isbook_en=
_NZ/book/initSearchForFlights.do">https://flightbookings.airnewzealand.co.n=
z/isbook_en_NZ/book/initSearchForFlights.do</a>&quot;&gt;Empty=20
document.&lt;/error&gt;</span></font></p>
<p class=3D"MsoNormal"><font face=3D"Arial" size=3D"2"><span style=3D"font-=
size: 10pt; font-family: Arial;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
&lt;/htmlparser&gt;</span></font></p>
<p class=3D"MsoNormal"><font face=3D"Arial" size=3D"2"><span style=3D"font-=
size: 10pt; font-family: Arial;">&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/step&gt;</span></font>=
</p>
<p class=3D"MsoNormal"><font face=3D"Arial" size=3D"2"><span style=3D"font-=
size: 10pt; font-family: Arial;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp; &lt;failure=20
message=3D&quot;com.canoo.webtest.engine.StepFailedException: Step[invoke=
=20
&amp;quot;ISIS SFF NZ search page&amp;quot; (1/1)]: HTTP error 302, at: inv=
oke,=20
Step: InvokePage at F:\WebTest\doc\ISIS\tempTest.xml:9:&nbsp; with=20
(description=3D&amp;quot;ISIS SFF NZ search page&amp;quot;,=20
method=3D&amp;quot;GET&amp;quot;,=20
resultFilename=3D&amp;quot;response_1163708742276_invoke.html&amp;quot;,=20
taskName=3D&amp;quot;invoke&amp;quot;,=20
url=3D&amp;quot;https://flightbookings.airnewzealand.co.nz/isbook_en_NZ/boo=
k/initSearchForFlights.do&amp;quot;)&quot;/&gt;</span></font></p>
<p class=3D"MsoNormal"><font face=3D"Arial" size=3D"2"><span style=3D"font-=
size: 10pt; font-family: Arial;">&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/results&gt;</span></font></p>
<p class=3D"MsoNormal"><font face=3D"Arial" size=3D"2"><span style=3D"font-=
size: 10pt; font-family: Arial;">&nbsp;&nbsp;&nbsp;=20
&lt;/testresult&gt;</span></font></p>
<p class=3D"MsoNormal"><font face=3D"Arial" size=3D"2"><span style=3D"font-=
size: 10pt; font-family: Arial;">&lt;/summary&gt;</span></font></p>
<p class=3D"MsoNormal"><font face=3D"Arial" size=3D"2"><span style=3D"font-=
size: 10pt; font-family: Arial;">&nbsp;</span></font></p></div>

------=_Part_20468_11620552.1163710935188--