Externalized Strings in SWTBot: best practices [message #484645] |
Tue, 08 September 2009 15:23 |
Elena Nayashkova Messages: 12 Registered: July 2009 |
Junior Member |
|
|
Hi,
it's common in SWTBot to search for a particular widget by its text or
label. And, to ensure that your tests don't fail in case those Strings
were changed, it is logical to use the externalized Strings. For your
plugins it is relatively easy to find the location of the keys (e.g. in
message.properties, plugin.properties, etc), but how to find the keys for
the Strings from other plugins, e.g. for Eclipse's menues, dialog labels.
What is your experience in solving this problem?
Best Regards,
Elena.
|
|
|
Re: Externalized Strings in SWTBot: best practices [message #484664 is a reply to message #484645] |
Tue, 08 September 2009 16:57 |
Ketan Padegaonkar Messages: 873 Registered: July 2009 |
Senior Member |
|
|
In our case we don't externalize strings in property files.
We've realized that keeping the tests readable is more important than
reducing code (or string duplication).
We use plain strings in tests. If at all the developers change any UI
that'll break tests we ensure that we update the tests accordingly. Also
we notice if any UI tests break at the end of every check-in as part of
the automated build process.
--
Ketan
http://studios.thoughtworks.com/twist | http://twitter.com/ketanpkr
On 08/09/09 8:53 PM, Elena Nayashkova wrote:
> Hi,
>
> it's common in SWTBot to search for a particular widget by its text or
> label. And, to ensure that your tests don't fail in case those Strings
> were changed, it is logical to use the externalized Strings. For your
> plugins it is relatively easy to find the location of the keys (e.g. in
> message.properties, plugin.properties, etc), but how to find the keys
> for the Strings from other plugins, e.g. for Eclipse's menues, dialog
> labels. What is your experience in solving this problem?
>
> Best Regards,
> Elena.
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.02386 seconds