[Seaside] Pharo/Seaside UI testing

Tony Fleig tony.fleig at gmail.com
Thu Jan 20 21:01:51 UTC 2011


Thanks Sven!

I have updated my test code and uploaded the new version to Squeaksource and
updated the blog entry to reflect the changes as well.

I'll look at using the Zinc Seaside adaptor was well. (It'd be nice to have
the tests run regardless of whether there was already a Seaside server up
and running.)

TF

On Thu, Jan 20, 2011 at 12:33 PM, Sven Van Caekenberghe <sven at beta9.be>wrote:

> Hey Tony,
>
> On 20 Jan 2011, at 19:18, Tony Fleig wrote:
>
> > I just tried it and it seemd to work:
> >
> > http://www.tonyfleig.com/smallthoughts/blog/seasideautomatedtesting
> >
> > There's an updated version usinf Zinc in place of WebClient here:
> >
> > http://www.tonyfleig.com/smallthoughts/blog/seasideautomatedtesting2
> >
> > Let me know if it still doesn't work for you.
>
> This is great!
>
> Since our last discussion, I was interested to see how the redirects went
> and I saw that sadly you still had to them manually. So I decided to load
> all your code and to try to find out what went wrong. (BTW, I was already
> planning to check out TFLogin, so this was a good first step.)
>
> I found the problem and commited a new version of Zn fixing the problem.
>
> You could simplify the use of Zn in your code as follows:
>
> TLTest>>#setup
>
>        "...."
>        client := (ZnHttpClient new).
>        client settings followRedirect: true. "actually not needed since
> this is the default"
>        client settings timeout: 5.
>
> TLTest>>#clickOn:in:with:
>
>        "..."
>        response := (client post: url data: args).
>        "response isRedirect ifTrue: [
>                url := self baseUrl, (response location).
>                response := client get: url ]."
>        ^ response contents
>
> (I added some newer API in the commented out section). This could further
> be simplified to:
>
>        ^ (client post: url data: args) contents
>
> All TF-Login test are/remain green with these changes.
>
> Sven
>
> PS: I also applied a small fix to actually honor the timeout ;-)
>
> BTW: There is also a Zinc-Seaside adaptor, so you could use the Zn server
> part as well.
>
>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20110120/92f57407/attachment.htm


More information about the seaside mailing list