I have just tried this and it does not work. The test is just skipped.
<WebTest version="1.0">
<params>
<param name="ignore_case">yes</param>
<list name="mail_addresses">
<param>bko...@pl...</param>
</list>
<param name="mail_server">X.X.X.X</param>
<param name="mail">all</param>
</params>
<test>
<code name="min_bytes">return $min_bytes</code>
<param name="max_bytes">99000</param>
<param name="url">http://www.anysite.com</param>
<param name="test_name">AWEB Login Page</param>
<list name="text_require">
<param><![CDATA[Login]]></param>
<param><![CDATA[Password]]></param>
</list>
</test>
</WebTest>Failed Succeeded Test Name
0 4 AWEB Login Page
Test Name: AWEB Login Page
URL: http://www.anysite.com
STATUS CODE CHECK
Expected '200' and got: 200 OK SUCCEED
REQUIRED TEXT
Login SUCCEED
Password SUCCEED
CONTENT SIZE CHECK
Number of returned bytes ( 36308 ) is < or = 99000 ? SUCCEED
Total web tests failed: 0 succeeded: 4
Thanks for trying to assist me
Bob Koertge
On Thu, 2005-02-03 at 20:25 +0100, Johannes la Poutre wrote:
> Op 3-feb-05 om 16:01 heeft Bob Koertge het volgende geschreven:
>
> > I have a question maybe someone could help me with.
> >
> > I am using XMLParser in perl. What I would like to know is, is there
> > a way to specify a variable in the xml file that perl will expand.
> >
> > ie
> > <test>
> > <param name="min_bytes">$min_bytes</param>
> > </test>
>
>
> Bob,
>
> The following should work:
>
> <test>
> <code name="min_bytes">return $min_bytes</code>
> </test>
>
> This works because of the contents of a "code" element result in an
> (anonmymous) subroutine, rather than a scalar value for a plain "param"
> element.
> (You should define the variable $min_bytes somewhere else in your
> script).
>
> Hope this helps, otherwise please let me know!
>
> Cheers,
>
> Joe.
|