Swing, JavaFX, SWT can be combined together in a single application not only by using top-level windows of different technologies but also by embedding components of one technology into windows of another. QF-Test supports testing such kinds of applications.
4+ Also web pages can be integrated into Java applications by use of embedded browsers, e.g. JavaFX's WebView component of JxBrowser. QF-Test provides support for a number of such hybrid combinations.
To that end, the concept of a GUI engine was introduced. One GUI engine is responsible for handling recording and replay for one GUI toolkit thread. Normal applications have only one such thread. As explained above, combinations of Swing, JavaFX and SWT are possible that have one thread each and will thus require two GUI engines to operate in parallel. In theory it is also possible to have multiple GUI engines of the same kind, e.g. by creating multiple instances of the SWT Display class.
Each QF-Test GUI engine is identified by a token for the GUI toolkit and a number.
swt0 are the primary GUI engine for
AWT/Swing, JavaFX and SWT. Unless you have a very special application you will
never need to concern yourself with the number of the engine, as there will never be an
swt1 and the alias
swt is sufficient. When recording, QF-Test
always uses the latter.
NoteIf your application is either AWT/Swing only , JavaFX only or SWT only, engine names can be left empty.
Typically engine identifiers are automatically set correctly during replay. Only when inserted by hand they need to be considered. In a test-suite, engine identifiers are now stored in the following places.
JFileChooseris implemented in Java and can be fully controlled by QF-Test. The SWT
FileDialogon the other hand is similar to the AWT
FileChooser. Both are implemented natively and QF-Test has no control over the individual controls. Also the JavaFX
FileChooserneeds special handling. Thus file selection must be replayed using the 'File selection' node. Because this node is not explicitly associated with a 'Component' or 'Window' node, the engine has to be specified within the node.
|Last update: 7/21/2021
Copyright © 1999-2021 Quality First Software GmbH