[Webtest] clicklink in multilanguage applikation

Dierk König webtest@lists.canoo.com
Sat, 8 Mar 2003 12:29:56 +0100


Hi Stefan,

> We could use property files for the different language. But we
> don’t want to
> translate all labels twice. Once for the application to get the
> text and for
> webtest.

In my current project, we have the same issue with labels in ResourceBundles
(although they are
not translated).
We settled for the solution to use
	<property file="myResourceBundle.properties"/>
to use the same labels in WebTest as in the application.

The upside is the single sourcing of that information. It also appears to
make the WebTests more readable, as e.g. "${application.title}" carries more
semantic than "Web Shop".

The obvious downside is that if that file is crappy, the WebTests will not
catch it.

This leaves us with the question of testing property files.
At this point we don´t do that. If it becomes necessary, I think I will go
for a setup test written as a unit test to read the file and do some sanity
checks (#keys=#values, all values length > 0, #keys=n, etc.).

> It’s not possible to use the application translation files for
> webtest.

What format are the "application translation files"?
XML, e.g. could be easily transformed to the a=b format (via style task) in
most cases (but character escaping may be at issue here).

cheers
Mittie

P.S. Was it you who was about to send me the improved reporting.xsl ?