[TIP] Python GUI testing

Gary Bernhardt gary.bernhardt at gmail.com
Wed Apr 6 12:12:35 PDT 2011


On Wed, Apr 6, 2011 at 4:11 AM, Michael Foord <michael at voidspace.org.uk> wrote:
> Right, but relying on ordering makes your tests fragile to UI changes -
> which is particularly an issue when you're doing TDD and adding features to
> an app. (I'm not questioning your assertion that it worked fine for you Gary
> - just making a general point.)
>
> Walking the controls in a view until you find the right one (with the right
> contents for example) as you describe is a good way to mitigate against
> this. On the other hand being able to name controls and then find them in
> the view by name is a useful way of not being dependent on ordering. This
> was the approach (or one of the approaches) we took at Resolver Systems.

Very true—I'd definitely go with control names if possible. I'm
slightly less afraid of building tests without them now, though. :)

-- 
Gary
http://blog.extracheese.org



More information about the testing-in-python mailing list