Quickstart your application

This chapter provides instructions on how to quickly set up your application as the SUT (System Under Test).

Video The video 'The Quickstart Wizard Java' shows how to work with the Quickstart Wizard for Java applications.

The video 'The Quickstart Wizard Web' shows the Quickstart Wizard for web applications.

In order to make you application recognized by QF-Test as SUT it basically needs to be started out of QF-Test. There are a number of special process nodes available within the »Insert«-»Process nodes« to perform this task but the straight forward way is to use the Quickstart Wizard as described below. For those with an aversion to wizard dialogs, the manual way is explained at section 44.1.

A precondition for testing Java based SUTs is that QF-Test can hook into the GUI toolkit:

Swing For Swing/JavaFX or combined Swing/JavaFX and SWT applications QF-Test hooks into the Java's JVM Tool Interface. Normally QF-Test can do this directly. Only for some non-standard JDKs it may be necessary to instrument those first. See JRE deinstrumentation for details if necessary.

JavaFX For JavaFX applications and respective combinations the connection works exclusively via the QF-Test agent. Please ensure the option Connect via QF-Test agent is activated.

SWT For Eclipse/SWT based applications, an instrumentation of the SWT library may be necessary. The Quickstart Wizard, which is described below, will automatically add the necessary step to the setup sequence. For detailed technical information please see section 45.2.

Web Web application testing does not require instrumentation but there are some constraints to consider that are explained in chapter 14.

Setup sequence creation

With the Quickstart Wizard QF-Test offers a convenient utility for creating a startup sequence for your application.

You can open the Quickstart Wizard via the »Extras«-»Quickstart Wizard...« menu item or the Quickstart Wizard toolbar button. Please follow the steps which should be self explanatory.

Quickstart Wizard
Figure 3.1:  Quickstart Wizard

As result the Wizard delivers a startup sequence under the "Extras", as shown in the following figure:

Quickstart Wizard result
Figure 3.2:  Startup sequence created by the Quickstart Wizard

The created setup sequence varies depending on the specific type of the application. But all of them follow the same standard. At the beginning you will find a 'Set variable' node which specifies the name of the SUT client for QF-Test. This node is followed by a 'Wait for client to connect' node that checks whether its necessary to start the application. The subsequent 'If' evaluates the result of its predecessor and contains the start steps for your application. The actual launch takes place in the start node which is specific to the type of application. That node is followed by an other 'Wait for client to connect' node which ensures that QF-Test connects to your application during the startup procedure. (Details about the different start node types and attributes can be found in section 44.1.)

SWT For SWT based applications an additional procedure call node for SWT instrumentation is added.

Web The standard startup sequence for web includes some additional nodes for setting variables, initializing browser cache and cookie settings and possibly install a toolkit resolver. See chapter 14 for further information about starting a web based SUT.

Executing the setup sequence

The setup sequence can be executed directly after creation via selecting the green setup sequence node in the tree and pressing "Replay" toolbar button Replay.

When executing the setup sequence your application should start up and the "Start recording" button Record in the QF-Test toolbar should become activated which indicates that QF-Test is properly connected to the SUT.

Now you are able to record and replay your first test sequences as described in chapter 4. There is also a learning by doing tutorial available from the QF-Test help menu which guides you through all features of QF-Test.

In case you are facing an error message or the red "Start recording" button stays inactive, please proceed with the following paragraph.

In case the client does not connect ...

If your application (or the browser window in case of web testing) doesn't come up at all:

  • The error dialog QF-Test typically displays should provide a first indication.
  • Please look for error messages in the terminal window. If there is no terminal window visible in the bottom area of QF-Test, it can be activated through the menu item »View«-»Terminal«-»Show«. Additional information about program output can be found in section 3.4.
  • Be sure to double-check the attribute values in the setup sequence nodes are correct. Possibly a typo has crept in somewhere. Details about the different start node types and attributes can be found in section 44.1.
  • WebAs browser development cycles i.e. those of Firefox tend to shorten, be sure the installed browser is supported by the QF-Test version you are using. The terminal output should show a respective error message. See subsection 1.1.2 for the latest browser versions supported. Possibly you need to update QF-Test to a later version or temporarily use another browser. See chapter 14 for further information.

If the SUT gets visible but QF-Test is not able to connect to the client (ClientNotConnectedException):

  • Please double-check the terminal output content (see also above) for possible error messages.
  • In case the case the red record button in the toolbar gets activated after the error message occurred, the timeout value in the 'Wait for client to connect' node needs to be increased.
  • SWT For an Eclipse/SWT application first make sure that you specified the correct application directory. You may want to take a look at the run log (see section 7.1) to see if any warnings or errors were logged during execution of the 'Procedure' qfs.swt.instrument.setup.
  • Check the run log in general for possible additional error indications (see section 7.1).

After possibly having adapted your test suite or settings retry executing your setup sequence. If you are not getting any further you might want to consider trying a sample test suite from the tutorial or you contact our support.

Program output and the Clients menu

The standard output and error streams of all processes started by QF-Test are captured and stored in the run log under the node that represents the respective starter node. In this QF-Test does not distinguish between SUT clients and arbitrary processes or shell scripts started with a 'Start process' or 'Execute shell command' node.

The main window contains a shared terminal view that shows the output of all processes started by a test that was run from this window. The »View«-»Terminal« sub-menu holds items to configure whether this terminal is visible, whether the tree or the terminal should use the are in the lower left corner, whether long lines are wrapped and whether it is automatically scrolled to the end when new output arrives. Other items let you clear the terminal or save its contents to a file. The maximum amount of text that the terminal holds is configurable in the option Maximum size of shared terminal (kB).

In addition to the shared terminal, for each active or recently terminated process there is an individual terminal window that shows its output. These individual terminal windows can be opened from the »Clients« menu. The shared terminal's intention is to provide visual feedback whenever new output arrives, while the individual terminals are better suited for actually studying that output.

Active processes can also be stopped with the help of the »Clients« menu, either individually in the respective sub-menu or all at once with »Clients«-»Stop all clients«.

The number of terminated clients that are kept in the »Clients« menu is set with the option Number of terminated clients in menu. If your processes generate lots of output and you are low on memory you may want to reduce that number.

Note The »Clients« menu also serves well in case you are not sure which specific QF-Test product you need to purchase. The GUI technologies used by your applications are shown in '[ ]' next to the active client name. The example below shows two clients using Java swing and web which suggests to buy a QF-Test/swing+web license.

GUI technology information
Figure 3.3:  GUI technology information

An application started indirectly from an already connected SUT

If a second Java VM is started from an already connected SUT, QF-Test will recognize this as an indirect connection attempt from a child process of the first SUT and automatically assign an artificial client name to this new SUT. The name is created by appending ':2' to the client name of the parent SUT, signifying that this is the second process for this client. Yet another Java VM started by either of these SUTs would get ':3' appended to the original client name unless the second process was already terminated so the ':2' was again free for use.

To summarize, the sequence for connecting to an indirectly started SUT typically consists of an event node that triggers something like a button click or menu selection, causing the SUT to launch the second SUT, followed by a 'Wait for client to connect' node for the ':2' extended client name.