[Seaside] Re: Testing a callback (no functional test)

Lukas Renggli renggli at gmail.com
Mon Apr 30 14:38:41 UTC 2012


On 30 April 2012 15:56, Dav <lasmiste at gmail.com> wrote:
>
> Lukas Renggli wrote
>>
>> +1 for Philippe's answer.
>>
>> You do not want to test the Seaside callback mechanism, do you? This is
>> already tested in functional and unit tests.
>>
>> Lukas
>>
>
> I see. The reason behind my thoughts is I'd like to reduce feedback of the
> correctness of my code without waiting for an interaction with a browser or
> a functional test.
>
> Let's take another simple example from your book:
>
> WebCounter>>renderContentOn: html
> html heading: count.
> html anchor
> callback: [ self increase ];
> with: '++'.
> ....
>
> And let's suppose I already tested "increase" and "decrease".
> Unfortunately by mistake, I change the code this way:
>
> WebCounter>>renderContentOn: html
> html heading: count.
> html anchor
> callback: [ self decrease ];
> with: '++'.
> ....
>
> I cannot realize the error until I run some functional tests. That's why I
> prefer to have a warning of my mistakes early in my development flow.

Understood. Seaside has no built-in support for such tests. There are
however various projects that provide (or provided) such
functionality. You might want to try WebTester
(http://www.squeaksource.com/WebTester.html). Not sure how well it
works with recent versions of Seaside?

Lukas

-- 
Lukas Renggli
www.lukas-renggli.ch


More information about the seaside mailing list