Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » Externalized Strings in SWTBot: best practices
Externalized Strings in SWTBot: best practices [message #484645] Tue, 08 September 2009 15:23 Go to next message
Elena Nayashkova is currently offline Elena NayashkovaFriend
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 Go to previous messageGo to next message
Ketan Padegaonkar is currently offline Ketan PadegaonkarFriend
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.
>
Re: Externalized Strings in SWTBot: best practices [message #484775 is a reply to message #484645] Wed, 09 September 2009 07:31 Go to previous message
Kay-Uwe Graw is currently offline Kay-Uwe GrawFriend
Messages: 24
Registered: July 2009
Junior Member
We always externalize our own application strings because we develop the
application usually at least bilingual. We use the NLS mechanism which
works well with SWTBot as well. We use IDialogConstants in our swt bot
tests to get access to the button labels which are not explicitly set in
our application code (e.g. wizards). Strings from external plugins which
can not be accessed otherwise we usually externalize manually into an
utility class which we use in the swt bot tests.

Kay
Previous Topic:SWTBot Spy Plugin
Next Topic:Select Tree Items Problem
Goto Forum:
  


Current Time: Thu Mar 28 17:05:06 GMT 2024

Powered by FUDForum. Page generated in 0.02386 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top