46
Running an application from QF-Test

NoteThe Setup sequence creation is the recommended tool to set up your SUT for testing. It results in an advanced setup sequence already prepared for later requirements.

This chapter contains some details in case you want to create a setup sequence yourself.

46.1
Various methods to start the SUT

With the Quickstart Wizard QF-Test offers a utility to guide you through the steps of creating a start sequence for your SUT. Please refer to chapter 3 for more information about the Quickstart Wizard.

Nevertheless we also want to describe how to create a start sequence for your application manually. There are basically two ways to start a Java application as an SUT from QF-Test. The first one is based on the standard java ... command line with its two variants for either starting a class or a jar file. The alternative is running a script or executable file which will then start the Java program. Indirect methods like launching the SUT through ant also fall into this category, as do Java WebStart.

The following examples show some typical setups. To get more detailed information about the required attributes, please follow the respective links to the reference manual. The tutorial also includes a number of examples.

Independent of how the SUT is started, the respective node should typically be followed immediately by a Wait for client to connect node with an identical Client attribute. Again, see the reference manual for further details.

46.1.1
A standalone script or executable file

If your application is started through a script or a binary executable, create a Start SUT client as follows:

Starting the SUT from a script or executable
Figure 46.1:  Starting the SUT from a script or executable
46.1.2
An application launched through Java WebStart

Using the new connection mechanism, an application launched through Java WebStart can be started directly from QF-Test without the need to modify any JNLP files (so do not use »Extras«-»Create WebStart SUT client starter...«). Instead create a Start SUT client node as follows:

Starting the SUT through Java WebStart
Figure 46.2:  Starting the SUT through Java WebStart
46.1.3
An application started with java -jar <archive>

If your application is normally launched through a command of the form java -jar <archive>, create a Start Java SUT client node as follows:

Starting the SUT from a jar archive
Figure 46.3:  Starting the SUT from a jar archive
46.1.4
An application started with java -classpath <classpath> <class>

If your application is normally launched through a command of the form java -classpath <classpath> <class>, create a Start Java SUT client node as follows:

Starting the SUT via the main class
Figure 46.4:  Starting the SUT via the main class
Web46.1.5
A web application in a browser

Like Swing, JavaFX or SWT clients, a web-based SUT - i.e. a browser - is started as a separate process from within QF-Test. In order to gain access to the internals of the browser and the web page shown with its Document Object Model (DOM), QF-Test embeds a standard browser like Chrome in a special wrapper application. The technology for embedding and accessing those standard browsers enables efficient access to the DOM beyond the browsers' standard interfaces and a unified interface that hides browser differences and enables QF-Test - and thus you - to focus on test automation with a single set of tests for all supported browsers on multiple platforms.

A Start web engine node can be used to launch a browser.

Launch the browser process
Figure 46.5:  Launch the browser process

Browser windows can be opened via a Open browser window node in an already running process.

Open the web site in the browser
Figure 46.6:  Open the web site in the browser

Note When setting up the startup sequence with the Setup sequence creation or defining your own Directory of browser installation attribute, try pointing QF-Test to a current Firefox installation. On Linux, the standard browser for your distribution may be installed in various places.

46.1.6
Opening a PDF Document

4.2+ QF-Test allows to verify PDF documents. Therefore, a client is started as separate process within QF-Test. In order to gain access to the internals of the PDF document and its components QF-Test analyzes the document in its own viewer.

Opening a PDF Document
Figure 46.7:  Opening a PDF Document

A Start PDF client node can be used to launch the viewer and to open the PDF document.

More information can be found in chapter 18.