Mailingliste - Einträge 2005


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

Re: [qftestJUI] machine upgrade


  • Subject: Re: [qftestJUI] machine upgrade
  • From: Gregor Schmid <Gregor.Schmid@?.de>
  • Date: Tue, 21 Jun 2005 07:32:03 -0000

Hi everyone,

I took a look at Helen's suite and she's facing a very typical
situation, so here are some hints what to do in that case:

The main window of her application has a title that includes the
current user and machine, so it varies. setName() has been used
sparingly or not at all and the main window has no name. After
building her tests for a while, she moved to a different machine and
now qftestJUI records the window and all its components again because
the title has changed and there is no name.

Now the best option would be to have developers set a name on the main
window. The next best option is to write a name resolver. The easiest
option however, is to change the "Feature" attribute of the window
node in qftestJUI to a regular expression that matches all variants. If,
for example, the title is "My Window - (user@host)", change it to
"MyWindow - \(.*@.*\)" and check the "Regexp" checkbox. Note that the
'(' and ')' characters have to be escaped because they have a special
meaning in a regexp. See section 20.4 in the manual for details about
regexps.

Now comes the tricky part: How to merge all the different window nodes
and their child nodes in qftestJUI that have already been recorded? My
advice used to be: "Use the update components mechanism", which is OK
and works, but has problems, because in case of complex windows not
all components may be visible at the same time. Instead, a "Merge
components" function would be nice that simply merges the similar
window nodes into a single node. We're probably going to provide one
in the future.

Meanwhile, you can use the import functionality to the same effect as
follows:

- Make a backup of your test-suite.

- Create a new, empty suite, save it in the same directory (lets call
  it "temp").

- In your suite (lets call it "current"), right click on the "Windows
  and components" node and select "Remove unused components".

- Modify all variants of the window node you intend to merge in the
  same way, i.e. copy the new name or the new regexp feature to all
  variants (don't forget to also check "Regexp" in the latter case).

- Important: Change the root node of your "current" test-suite to
  include the "temp" suite (as the first suite if you already have
  includes).

- Important: If there are any suites that directly or indirectly
  include the suite "current", be sure they are listed in the
  Dependencies (reverse includes). Indirect reverse includes are fine.

- Now open the "temp" suite and import the "current" suite. All
  components are moved from "current" to "temp" and during this
  process they are merged and the IDs of all referencing components
  are updated to reflect the change.

- Move all window nodes back from "temp" to "current". Save "current"
  and throw away "temp".

- Test thoroughly to make sure that nothing has gone wrong.

Best regards,
    Greg

"Helen Wai Wan Tam" <htam@?.com> writes:

>    Hi,
>
>    The "Windows and Components" of QFS test suites are recorded under the
>    name of my machine.  I will be upgrading to a new machine and would
>    like to know what should be done to transfer the test suites to a new
>    machine and have the suites run properly in the new machine without
>    changing any setting or configuration?
>
>    Regards,
>    Helen

--
Gregor Schmid                                Gregor.Schmid@?.de
Quality First Software GmbH                     http://www.qfs.de
Tulpenstr. 41                                Tel: +49 8171 919870
DE-82538 Geretsried                          Fax: +49 8171 919876


Videos Downloads Dokumentation Kaufen Gratis Testen