Legacy Code & Abbot
I am currently trying to write tests for a huge 'legacy' application written in Swing on JDK 1.2.
Many (if not most) of the components are not named. Which makes them hard to find via Abbot's component finder mechanism.
The components of interest are dynamically generated. Which is why the are not named.
Abbot has many different means to find the components but I have tried them all and still end up unable to narrow the search to one component. I don't want to hard code 'the third one should have this value' kind of tests because they become way too brittle and would require too much maintenance. I have used the Abbot script runner to identify the component but since it is not uniquely identifiable when the test is rerun I get 'mulitple component found' exceptions.
So my quest is to figure out a low impact way to get these tests done. I am currently thinking of modifying the code to get it to assign names to all the components. Which I had to do without a good regression test in place (you never know who depends on 'null' being the name of a component in some logic somewhere) but I think it is likely a low impact addition that I can try out to see if it makes my tesing easier without breaking a ton of stuff.
I also started rereading Working Effectively With Legacy Code. Its a great read but does not have enough specifics for GUI code. If you are involved in maintenance though it is worth downloading and reading this paper. I think you have to be a member of the yahoo group to get at it. If the above link does not work try out Refactoring Group join and select 'files' which should get you to the pdf.
So I'm left with this question for you reader, what suggestions and tricks etc have worked for you?

