3 QF-Test startup options for running or administrating the license server

5.2+ For maximum flexibility the names of all QF-Test arguments are case-insensitive and embedded '-', '_', '.' and ':' characters are ignored, so -licenseserver.logfile is equivalent to --licenseserverLogfile or -licenseserver-logfile. The latter is the officially documented form because it avoids conflicts with Windows PowerShell.

WindowsThe program qftest.exe is a Windows GUI application. When started from a command shell, it will not wait for QF-Test to terminate but return immediately and you won't see any output from QF-Test in the console window. For running the QF-Test license server as a Windows service or autostart program this is fine. For running the license server from a Windows command shell you may prefer to utilize the qftestc.exe console application. It waits for QF-Test to terminate and output will be displayed in the console window. Apart from that, everything said about qftest.exe in this chapter holds true for qftestc.exe too.

3.1 Call syntax

3.1.1 Server side operations

The following commands apply to the license server. They must be run on the license server machine and require a server license.

Starting the license server

The license server is started as follows:

qftest -batch [-dbg] [-java <executable>] [-noconsole] [-J<java argument>]* [-license <file>] [-licenseserver-logfile <file>] [-licenseserver-verbose <level>] [-option <name>=<value>] [-options <file>] -licenseserver

Setting the administrator password for the license server

To set the administrator password for the license server on the server side, use the following syntax for <user> admin:

qftest -batch [-dbg] [-java <executable>] [-noconsole] [-J<java argument>]* [-license <file>] [-licenseserver-logfile <file>] [-licenseserver-verbose <level>] [-option <name>=<value>] [-options <file>] -licenseserver -licenseserver-setpwd <user>=<password>

3.1.2 Client side operations

The following commands can be executed with QF-Test on either the license server machine or a client machine. They require a client license matching the server.

Stopping the license server

To cleanly shut down the license server, use the following syntax:

qftest -batch [-dbg] [-java <executable>] [-noconsole] [-J<java argument>]* [-license <file>] [-option <name>=<value>] [-options <file>] [-licenseserver-password <password>] -licenseserver-shutdown

Saving the user's password for the license server

By running this command once, the administrator password will be saved for the current user so that the command line argument -licenseserver-password <password> can be omitted in future calls:

qftest -batch [-dbg] [-java <executable>] [-noconsole] [-J<java argument>]* [-license <file>] [-option <name>=<value>] [-options <file>] -licenseserver-setpwd <user>=<password>

Currently the only username supported is admin.

Getting detailed information about the current license usage

You can get a list of all currently used licenses with the following command:

qftest -batch [-dbg] [-java <executable>] [-noconsole] [-J<java argument>]* [-license <file>] [-option <name>=<value>] [-options <file>] [-licenseserver-password <password>] -licenseserver-dump

The result is printed to standard output in comma-separated values (CSV) format including a header line.

Getting summary information about the current license usage

You can get a summary of the currently used licenses with the following command:

qftest -batch [-dbg] [-java <executable>] [-noconsole] [-J<java argument>]* [-license <file>] [-option <name>=<value>] [-options <file>] [-licenseserver-password <password>] -licenseserver-dumptotal

The result is printed to standard output in comma-separated values (CSV) format including a header line. The lines of data show the current license usage, the remaining unused licenses and the total available licenses.

Getting summary information about peak license usage

The QF-Test license server internally tracks peak usage. You can get the values with the following command:

qftest -batch [-dbg] [-java <executable>] [-noconsole] [-J<java argument>]* [-license <file>] [-option <name>=<value>] [-options <file>] [-licenseserver-password <password>] [-licenseserver-verbose <level>] -licenseserver-dumppeak

The result is printed to standard output. If the log level -licenseserver-verbose <level> is VERBOSE or higher, the time at which the peak was reached is printed. If it is DETAIL, the individual leases causing the peak are listed as well.

Interactive license server administration

This command launches a dedicated license server administration GUI for interactive use. You can also open this window from an interactive QF-Test instance via the menu »Extras«-»Administrate license server«.

qftest [-dbg] [-java <executable>] [-J<java argument>]* [-license <file>] [-option <name>=<value>] [-options <file>] -licenseserver-admin

3.2 Command line arguments

Command line arguments for QF-Test fall in three categories.

3.2.1 Arguments for the starter script

These arguments are evaluated directly by the qftest shell script or executable and override settings determined during installation. Under Linux these settings are stored in the file launcher.cfg in QF-Test's root directory, under Windows they are stored in the registry.

-batch
Run QF-Test in batch mode. This is a required argument for the license server.
-dbg
Turn on debugging output for the starter script. The same effect is achieved by setting the environment variable QFTEST_DEBUG to a non-empty value. On Windows this causes QF-Test to open a console window to display the output that would otherwise be invisible unless the argument -noconsole is also given.
-java <executable>
The Java executable used to run QF-Test. The default is java on Linux and javaw.exe on Windows, unless a different value was set during installation.
-noconsole (Windows only)
On Windows this argument suppresses the console window that would otherwise be opened in case -dbg is specified.

3.2.2 Arguments for the Java VM

You can pass arguments to the Java VM through the starter script by prepending them with -J, e.g. -J-Duser.language=en to set a system property.

3.2.3 Arguments for QF-Test

The rest of the arguments are handled by QF-Test itself when it is executed by the Java virtual machine. These arguments can also be placed in a file using the syntax <name>=<value> for arguments with parameters or <name>=true or <name>=false to turn a simple argument on or off. By default this file is called qftest.options, located in the bin directory of QF-Test and used only for internal logging purposes. If you change anything in this file, you can move it to QF-Test's root directory so your changes will still apply after upgrading. Alternatively you can use the -options <file> argument to specify a different file. Arguments given on the command line override arguments from an option file except for those which can be given multiple times. In the latter case the arguments are merged.

-license <file>
Set the location of the license file.
-licenseserver
Start QF-Test in license server mode.
-licenseserver-admin
Open the license server administration GUI.
-licenseserver-dump
Print detailed information about the currently used licenses.
-licenseserver-dumptotal
Print summary information about the currently used licenses.
-licenseserver-dumppeak
Print information about peak license usage. If the log level defined with -licenseserver-verbose <level> is DETAIL, also print the individual leases that caused the peak usage.
-licenseserver-logfile <file>
Write log messages to the specified file. The default log file is licenseserver.log in the log directory of QF-Test, either under QF-Test's system directory or the user directory. To suppress logging, use the argument with an empty value in the form -licenseserver.logfile=.
-licenseserver-password <password>
The password for connecting to the license server as the user admin. Can be omitted if the password was previously saved for the current user during interactive use or via the command line argument -licenseserver-setpwd <user>=<password>.
-licenseserver-setpwd <user>=<password>
Set a password for license server administration. Currently only one user named admin is supported. When run in license server mode, i.e. in combination with -licenseserver the command changes the password for the license server. In client mode it saves the password for the current user so that no login is required when opening the license server administration window and no password must be specified via -licenseserver-password <password> when performing client-side batch operations.
-licenseserver-shutdown
Cleanly shut down the license server.
-licenseserver-verbose <level>
Set the log level for the license server. On the server side it determines how much detail is written to the log file specified with -licenseserver-logfile <file>. On the client side it determines how much detail to print for commands like -licenseserver-dumppeak. Supported values are numbers form 0 to 4 or the respective constants NOTHING, ERRORS, TERSE, VERBOSE, DETAIL. The default value is TERSE.
-nomessagewindow
In case of a fatal error in batch mode QF-Test prints an error message to the console and for improved visibility also brings up an error dialog for about 30 seconds. That dialog can be suppressed with the help of this argument.
-option <name>=<value>
Specifies options. -option <name>=<value> sets a value of the option with a name <name> to <value>. This argument can be given more than once to set several options.
-options <file>
Override the location of the file used to specify additional command line arguments. This argument can be given more than once to use several sources of command line arguments.
-version
Print version information and exit.