[Webtest] Re: WebTest Several Questions
Michael Habbert
Michael Habbert <Michael.Habbert@netpioneer.de>
Thu, 05 Apr 2007 11:56:11 +0200
Hi Gary,
Gary Fay wrote:
> Hello,
>
> I have a few questions and was wondering if I could get the information
> here.
>
> 1) I work with Adobe products and I am trying to move into Flex (Flash)
> does (will) Webtest support
> testing the Flash/Flex client side? (Adobe and/or Mercury have some sort
> of plug in .,...)
I don't know anything about ;-)
> 2) Does Groovy add special capabilites, or just a different way to call
> the same tags. I scanned in the bookstore Groovy in Action and "The"
> Grails book but it seemed like the same tag functions in Groovy as java
> statements.
yes you get special capabilities.
For example:
I recently had a test doing some booking. The test worked fine from monday to friday.
But on saturday or sunday he failed. I added a groovy-task:
<groovy description="find the next working day for vacation" >
def today = Calendar.getInstance()
def weekday = today.get(Calendar.DAY_OF_WEEK)
def sdf = new java.text.SimpleDateFormat("dd.MM.yyyy")
switch ( weekday ) {
case ( Calendar.SATURDAY ):
today.add(Calendar.DATE, 2)
break;
case ( Calendar.SUNDAY ):
today.add(Calendar.DATE, 1)
break;
}
step.setWebtestProperty ('next.workday', sdf.format( today.getTime() ))
</groovy>
<echo message="next working day is: #{next.workday}" />
I can't imagine how to do it without groovy ;-)
> 3) I found the question below interesting but I did not see the answer I
> expected.
> Does / how does Webtest support AJAX request HTTPXMLRequest object.
> I am trying to test an app that uses Rico / (dowdybrown.com) 's LiveGrid
> control and am having trouble
>
> 3.1) Would Groovy be helpful for #3 doing Ajax Requests?
As far as I know the limitations are based on htmlunit. Some things work some not. The development
is quite fast, so ...
> Thank you in advance.
>
> Gary
[...]
--
Mit freundlichen Grüßen
------------------------------------------------------------------------
Michael Habbert