Mailing list - Entries of 2006

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

[qftestJUI] generic component recognition

  • Subject: [qftestJUI] generic component recognition
  • From: "Nguyen, Tung" <tnguyen@?.com>
  • Date: Wed, 19 Jul 2006 14:03:25 -0700


> I have one silly question that I hope you can help me with. From my 
> testing with the Qftest tool thus far with the _default_ options 
> setting, I've seen that a SUT's component will need to be recorded 
> before it can be recognized and be used in a test case. Will this 
> ALWAYS be the case? Or is there a Qftest's options setting as such I 
> can provide a component's Id, for example, and the recognition 
> algorithm will somehow figure out what component to use even if  that 
> component has NOT been recorded previously?

Greg's answer:

If you have unique names in your generic components it's pretty easy to
set things up in qftest for generic use.

Manually create a Window node, id "generic_window" or like that,
class java.awt.Window, all other attributes empty, though you may
optionally use variables for name and or feature, e.g.
$(genericWindowTitle) for the feature and $(genericWindowName) for the
name. Define these variables with empty defaults at suite level.

Below this, create a similar component node, id "generic_component",
class java.awt.Component, name $(genericComponentName), rest empty.
Don't define an empty default for genericComponentName, if you use the
generic_component without this variable set it'll be an error. Then you
can target any event to the generic_component and all you need to do is
make sure that genericComponentName is set correctly.

Of course you can also make use of the feature in a similar fashion.
If you do so, set width and height of generic_component to some very
large values, e.g. 100000 each. That way you'll not get a positive match
unless name and/or feature are correct.

Best move all of this into a separate test-suite along with procedures
that operate on these components and include the suite where its needed.
This is the most convenient way to handle this.

Videos Downloads Documentation Buy Free Trial