lmi
[Top][All Lists]
Advanced

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

[lmi] Preserving configurable settings after GUI test


From: Vadim Zeitlin
Subject: [lmi] Preserving configurable settings after GUI test
Date: Tue, 3 Jul 2018 02:01:13 +0200

 Hello,

 There is a long standing TODO item about preserving the contents of
configurable_settings.xml file after running the GUI unit test, which
currently modifies it. The problem is that currently there doesn't seem to
be any simple and reliable way to do it using configurable_settings class
API: it doesn't allow neither copying it, which could be used to preserve a
backup copy, nor retrieving the underlying XML file path, which could be
used to make a backup copy of the file and restore it.

 I think that the possibility to do either one or the other needs to be
added, because the only other alternative I see is to use MemberSymbolTable
class API to make a member-by-member copy, which seems quite ugly. But I
have a lot of trouble guessing which of the approaches would you prefer.
>From my point of view, just exposing the XML file path would be the
simplest way to solve the problem, but it's also the least flexible one,
i.e. if configurable_settings ever changes to use some other source of
configurable information than a file (and I think this is perfectly
possible), the code in the unit test would need to be changed, while just
allowing to really copy the configurable_settings object contents would
still continue to work.

 So which one of the following would you prefer:

1. Make private configuration_filepath() function public, i.e. a (static)
   member of configurable_settings.
2. Make configurable_settings copy ctor and assignment operator public and
   implement them.
3. Use MemberSymbolTable methods directly.

or do you see some other approach?

 Thanks in advance,
VZ


reply via email to

[Prev in Thread] Current Thread [Next in Thread]