Mailingliste - Einträge 2005


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

Re: [qftestJUI] Some technical questions to help evaluate QFTestJUI


  • Subject: Re: [qftestJUI] Some technical questions to help evaluate QFTestJUI
  • From: Gregor Schmid <Gregor.Schmid@?.de>
  • Date: Wed, 04 May 2005 08:22:02 -0000

Hi everyone.

Though some of Kevin's could be answered by any exprienced user,
the list as a whole is probably a bit daunting.

Still, this is not just the "Users ask, Greg answers" mailing list :-)

It's a board for discussions and for users helping each other.
Everybody is welcome to post and every help in answering questions is
appreciated.

Anyway, here we go. See inline comments.

Kevin Duffey <supreme_java_guru_1@?.com> writes:

> Hi all,
>
> We are presently evaluating various tools. QuickTest,
> QFTestJUI, my own home grown harness using jfcUnit,
> and more.
>
> A few things we are concerned about:
>
> We render a large portion of our application. It's all
> painted, no components. We tried the demo and it
> doesn't appear to allow recording of clicks on
> components in the rendered/painted areas. Is there any
> way to handle this?

I need details about this. qftestJUI should record mouse clicks on all
components except if they are implemented natively, e.g. ActiveX, in
which case the Java EventQueue never "sees" the events.

> We are noticing the same problem that we found with
> our own home grown harness with regards to menus. It
> seems the interopolation/calulation of moving the
> mouse to a menu sometimes "falls off" the menu and on
> Windows, since they don't have sticky menus, the menu
> often closes and the test fails. We can use some hot
> keys, but for some reasons, not all menu items can
> have hot keys... any suggestions?

Are these standard Swing menus or custom "home grown" menus? Menus are
sometimes tricky because external hard events can interfere and cause
a menu to pop-down unexpectedly (something the next release will
address), but otherwise they should be fine. Can you send me a run-log
showing details? Have you tried turning off the option
"Replay->Events->Actually move mouse cursor"?

> How do we handle golden file projects, files, etc?
> Meaning, we have a "golden file" that we want to use
> every time in a given test. The end result is some
> output to a file, and we want to compare it. What is
> the work involved in doing this? Is Jython the only
> way we can set these things up for comparison?

This is easy. You can start any kind of process from qftestJUI and
check its output and exit code, so you can run a diff program on the
golden file and the file produced by the test.

> How do you handle long running tasks, such as a GUI
> component that spawns another thread that goes to the
> database and may not come back for some unknown amount
> of time?

There are various ways to do that. Usually there's some kind of visual
feedback, a dialog that appears (or disappears) after the task is
done, a button or label that changes state, etc. You can use "Wait for
component" or "Check" nodes with a very generous timeout. As soon as
the condition is satisfied, the test will continue. If there's no
visual feedback at all you'll need to use Jython.

> How are cases where a button, when clicked (or
> component) may spawn one of many different pop-up
> dialogs? Is it difficult to put in "if this shows up,
> do this.. if this shows up, do this instead.." sort of
> branches? Is that done via Jython, or can I easily do
> this via the GUI?

This is typically dones with Try/Catch nodes. When combined with
Procedures, and If/Elseif/Else nodes, pretty flexible tests can be
created.

> Can this tool be automated with our nightly build
> process, record results to html (or some way of seeing
> the results via email perhaps)?

Yes, qftestJUI -batch .... XML and HTML reports can be created
automatically and the exit code represents the overall test-result.
Sending an email is up to you.

> Does it have any ANT/MAVEN integration, and if so, can
> we use Emma/Clover to monitor code coverage that the
> QFTESTJUI covers? Does it have it's own code coverage
> built in?

No specific integration, but ant integration has been done (please
search the mailing list archive). You can use any coverage tool you
like. qftestJUI isn't aware whether the SUT is running with coverage
turned on. A search on the mailing list will also produce results
here.

> Most of our components do not have setName() nor would
> it be easy to go back and add to 1000's of components
> (its a pretty complex app).

Not every component needs a name. If you decide to use qftestJUI (or
probably any other automation tool) you should at least set some names
on the most important components.

> Absolute positioning (recording of x,y locations of movement) is
> probably the worse way to test due to resize issues, component
> location changes, etc. What alternative is there? Is there a way to
> actually write custom Java code and integrate it into a test? For
> example, in our rendered areas, we have internal calculation
> routines that if our tests could access and use, we could easily
> find the locations of "drawn" components (components NOT being
> Component subclasses but painted UI elements on screen). Is this
> possible?

Yes, this is possible. You can use Jython for that or write Java code
and put it in qftestJUI's plugin directory, then use Jython just for
glue code.

> How about internationalization? How easy is it to use
> the labels/text of dialogs, buttons, etc and make sure
> we use the SAME resource bundle that our code uses so
> that tests dont fail due to a different text string
> being used?

You can load porperty files or resource bundles and use those values
as variables in your test-suite. For component recognition, setName is
the preferred solution so that recognition of a button is independent
of its labes. Without setName, the label is very important and, though
possible, you're going to have a hard time running tests with
different locales.

Best regards,
    Greg
--
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