[Cosmo-dev] Getting a handle on specific UI elements

Mikeal Rogers mikeal at osafoundation.org
Fri Dec 8 00:32:38 PST 2006


Thanks for getting this kicked off.

With the speedy development of Cosmo it's not feasible for us to  
expect that things "won't change" and that we won't need to update  
our tests. But it is fair to put a few requirements on development  
going forward to make sure we maintain testability in the CosmoUI.

> 1. DOM-node ids have to be unique.

This is an absolute _MUST_. There is no way for us to simulate  
actions without unique ids.

> 2. QA needs to be able to identify a piece of UI in a repeatable  
> fashion.

Here are my 2 cents.

There is no problem with randomly generated id's for 'on the fly' UI  
elements from my point of view, so long as there is a repeatable  
place for us to find an array of those objects and a repeatable value  
with which we can parse the array for and get the id. I don't even  
care if the parsing takes a while, we'll manage. We have access to  
all the javascript objects in the UI so we won't be depending on the  
dev team to provide the parsing code, we'll just need to be pointed  
in the right direction.

Now the other hand, if there have a static button or UI element  
that's id is not static we shouldn't be writing javascript functions  
just to get the id when there is no technical reason it should be  
dynamically generated.

> 3. It needs to be a system that doesn't require a lot of  
> maintenence or manual updating.

As the UI grows we'll need to continue to expand the tests,  
obviously. Most of what we need to increase the testability is either  
already in the app or easy to add -- but documentation about it is  
rarely ready before the very end of the release, if ever.

Previously the process for gaining knowledge about the internal api's  
for the purposes of testing has been late night messaging and  
telephone sessions between Adam and Matt. Although they may be happy  
with this process, I do have my doubts about it's sustainability.

Right now when a checkpoint build is released Adam gets a few emails  
from people if they want to note that certain feature work has been  
completed. If in these email messages Adam was pointed to the right  
api's or arrays to be parsed for testability along with, hopefully,  
good in-code documentation I think he'll have enough to go on. QA  
will also try to keep documentation of all the work we do and the  
various internal objects we depend on going forward.

>
> I hope we arrive at something workable fairly quickly, as the way  
> QA is having to update names of buttons in tests by hand right now  
> is totally hokey.

I remember hearing something about this being an odd dojo quark. If  
so, this is something we need to "fix" dojo from doing.

-Mikeal


More information about the cosmo-dev mailing list