Mailing list - Entries of 2006


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [qftestJUI] Proper use of setname


  • Subject: RE: [qftestJUI] Proper use of setname
  • From: Martin Moser <martin.moser@?.com>
  • Date: Mon, 26 Jun 2006 13:51:09 +0200

Hi all,

I had to write ComponentNameResolvers for all projects, where I've been
involved yet.
That's why, I tend to set the names by the ComponentNameResolver because
you can then also manipulate those names to make component-names more
convenient for your test development, like Mark Michaelis wrote
already. 
In case of using a ComponentNameResolver it might be a good idea, if the
UI-developers only set the names of frames, dialogs and main-panels to
make it easier for the ComponentNameResolver-developer.

I also think, that dynamic naming isn't a good solution because this
could cause a lot of changes in the tests after code-refactoring.

Regards,
Martin

Am Montag, den 26.06.2006, 08:38 +0200 schrieb Michaelis, Mark:
> Hello Mark,
>  
> I had a different approach here: I started to write tests with a lot
> of pre-existing setNames in the code. At other places they were
> missing and sometimes there were names which make it even harder to
> write tests as there were different names for nearly the same
> component. Perhaps the last is the most interesting one: There is a
> way to specify names which may even make it harder to write tests. As
> workaround I wrote a ComponentNameResolver which maps the different
> names to one unique name.
>  
> I think best practice is to go the XP way, i. e. only add names if you
> need them. If you add a name to every component you might end up with:
>         a lot of unused names which still need to be maintained
>         and problems during development to find unique names (inside a
>         given frame)
>  
> The one who writes the tests knows best what would be a proper name
> and would immediately see if there are double names as the test will
> fail.
>  
> I don't think that dynamic names are a good solution. As you already
> mentioned refactoring can easily break the tests. There is only one
> case where I used dynamic names: When setting names for the dividers
> in JSplitPanes I implemented a calculation of the name for these
> dividers based on the names of the panes which belong to the
> JSplitPane. This was in the "before-qftest-phase". Nowadays I would
> write a ComponentNameResolver for this.
>  
> I hope I could give you some ideas how we handle it over here. It
> would be interesting to know if there are other best-practices.
>  
> Kind Regards,
>     Mark
>  
>  
> Mark Spielman wrote:
> 
>         Our organization is beginning to use qftestJUI to test two of
>         our GUI applications.  However I am finding it hard to
>         understand when, where and how to appropriately use setname to
>         make our lives easier?  We currently do not have extensive use
>         of setname in either of our two products.  We have tried two
>         approaches and both seem to work but are not necessarily
>         ideal.  We are only in the early stages of test development.
>         What I was wondering is if there are general guidelines we can
>         use to determine how to properly use setname to make our lives
>         easier.  I’ve read the manual and am searching for slightly
>         more detail, something along the lines of a best practices
>         technical note or something?
>         
>         The two approaches we’ve tried are:
>         
>               * Using java reflection to determine component names
>                 based on the coded variable names of the different
>                 components. In this case all components have names.
>                 Here there’s a potential for a component to change
>                 names if ever a developer refactors the code. 
>               * Manually adding names to components as we discover
>                 difficulties in qftestJUI test implementation.
>                 Components are named as needed but development of
>                 tests seems very slow. 
>         What I’m wondering is if you were going to start a project
>         from scratch, what is the ideal way to use setname to make
>         testing and test development most efficient.
>         
>         Thanks
>         
>         Mark 
>         
>   
> 
> --
> Mark Michaelis
> Software Engineer Quality Assurance
> 
> CoreMedia AG
> Ludwig-Erhard-Str. 18
> 20459 Hamburg, Germany
> www.coremedia.com
> 
> -------------------------------------------------------
> Any Content, Anywhere, in a Trusted Universe:
> CoreMedia CMS and CoreMedia DRM
> 
> 
> _______________________________________________
> qftestJUI-list mailing list
> qftestJUI-list@?.de
> http://www.qfs.de/mailman/listinfo/qftestjui-list
-- 
Martin Moser
SQM Services & Solutions Projektleiter

Phone: +49 711 806708 24
Mobile: +49 173 3449280
Fax:   +49 711 806708 19
eMail: martin.moser@?.com

daemons point GmbH
Zahn-Nopper-Straße 3
D-70435 Stuttgart

http://www.daemons-point.com




Videos Downloads Documentation Buy Free Trial