On May 19, 2004, at 15:58, Marek Janukowicz wrote:
>> I'm careful to separate the application and business object code from
>> the UI side, making it easier to test.
>
> Such a separation is rather obvious.

Sorry

>  The business logic is rather easy
> to test, but in my experience most bugs occur on the UI side 
> (especially
> in the connection layer between UI and business logic). How do you test
> UI?

I don't unit test it. To be honest, I've never found it worth while. I 
spend far more time maintaining the tests than the time I save because 
they exist.

And in all this, tested or not, I very, very rarely see the wrong type 
of object being used. Given that this is a thread object static typing, 
that seems relevant... :)

>
>> I also use a lot of meta-programming, which cuts down on the amount of
>> stuff where testing is needed.
>
> Could you elaborate some (maybe trivial) example? I know what
> meta-programming is, but I don't know how can it be employed in eg. web
> application testing.

For example, all my business objects use database wrapped objects to do 
the database access. All these are generated on the fly, and so I only 
have to test one generator, rather than 50 individual classes.


Cheers

Dave