[Webtest] newB confusion on storeregex

Marc Guillemot webtest@lists.canoo.com
Thu, 15 Jul 2004 10:07:40 +0200


a verifyXXX step always applies on the last response. To know on wich page your test fails, you just have to look at the 
last <invoke...>, <clicklink...>, <clibutton...> or <followframe...>

Marc.

Mike D'Ambrogia wrote:
> Ok, I think I'm understanding that.  But if I understand it correctly
> then I'm heading sideways with what I'm trying to do.  So I'll backup
> and restate my issue.
> 
> I'm testing a series of pages (about 700) on the website, I look to see
> if the entire page has displayed without any errors.  I've placed a
> <span> tag at the bottom of the file with an ID that I can xpath for.
> If the page has displayed correctly and it has no errors then I should
> see a <span> tag at the bottom of the page via a verifyxpath step.  This
> works great, no problems so far.
> 
> Following the webtest design methodology, since I test each and every
> page on my site for the <span> tag I've created an bottom_of_page.xml
> file in a ./modules subdir that I call for each page I test.
> 
> The problem comes when a page fails the verifyxpath for the span element
> the bottom of the page.  Because the entire page did not display I get
> an error.  That works as it should.  
> 
> But the problem is that I have no idea which of the 700-odd pages is
> failing.  So I'm trying to create a dynamic variable via storeregex to
> pass a page name to the bottom_of_page.xml module so that when the error
> displays I can show the page name within the error msg.  
> 
> The procedure I use right now resembles:
> 
> Use the storeregex step to store the variable 'case.asp' into
> #{pagename}
> Test the case.asp page using the verifyxpath step contained in
> bottom_of_page.xml
> 
> Use storeregex to store the variable 'stone.asp' into #{pagename}
> Test the stone.asp page using the verifyxpath step contained in
> bottom_of_page.xml 
> 
> Use storeregex to store the variable 'effort.asp' into #{pagename}
> Test the effort.asp page using the verifyxpath step contained in
> bottom_of_page.xml 
> 
> Repeat ad naseum...
> 
> Does storeregex only look for the text param value in the last page
> fetched by the last invoke step?  If so them I'm not using the right
> tool since those page names (case.asp, stone.asp, effort.asp) will not
> be part of any pages fetched by invoke.
> 
> The bottom line problem is getting the name of the page that is failing
> into the error message so I have some clue as to where to look.
> 
> Thanks for the reply, hope this is clearer.
> 
> Mike
> 
> <snip...>
> 
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest
>