Note QF-Test connects to AWT/Swing applications automatically unless you explicitly turn off the option Connect without JDK instrumentation (Swing) or use a non-standard JDK. In such a special case you must instrument the JDK first.
To instrument a JDK you need write permission for some of its directories, so you may have to run QF-Test with administrator privileges to perform this step. The accessibility interface and all the technical details of the modifications to the JDK are described in detail in chapter 42. This section concentrates on how to instrument or de-instrument JDKs and how QF-Test maintains information about which JDKs have been instrumented.
Having started QF-Test, please select the menu item »Extras«-»Manage JDK instrumentation...« to bring up the following dialog:
||Figure 42.1: Dialog for JDK instrumentation|
Note If you get a warning that the file used for storing information about JDK instrumentation is currently locked, this typically means that some other user working with the same QF-Test installation is currently instrumenting JDKs. In that case, try again a little bit later. If the lock doesn't go away even though nobody seems to be working on the instrumentation, you can ignore it.
The instrumentation dialog shows a list of JDKs and JREs which QF-Test "knows" about. Initially the list will only contain the JDK with which QF-Test itself is running. If your SUT will be started with a different JDK or JRE you need to tell QF-Test about it. To do so, use the "Search JDK/JRE" button to bring up the standard file selection dialog and choose a directory. QF-Test will search that directory and its direct or indirect sub-directories and add all JDKs it finds to the list.
If you don't know which JDK your SUT is going to run with, first instrument the one
JDK that's always shown, then try if it works. If it doesn't work, the record button
will remain deactivated when you start the SUT from QF-Test.
In that case you can either ask your developers or search for the JDK or JRE yourself.
C:\Program Files\Java is the most likely candidate. On Unix
systems locations vary. Possible candidates are
/usr/local/java, etc. It is also possible that
your application comes with its own JRE so letting QF-Test search the directory where the
SUT is installed may also turn up something.
The 'Type' displayed in the first column of the list is usually JDK or JRE, '---' denotes an invalid path. This type information is only given for completeness and you don't really need to concern yourself with it.
The value in the 'State' column is important. The values in this column can be any of the following:
To instrument, de-instrument or remove one or more JDKs from the list, select the entry or entries in the list and press the respective button. When done, save the list and close the dialog.
The list of JDKs QF-Test knows about is stored in the file
qfconnect.properties in QF-Test's system directory. If QF-Test is installed on a
network file system which is shared by multiple computers, possibly with different
operating systems, this single file will be shared by all systems. As you can see in the
image above, this is not a problem. When you bring up the dialog, QF-Test will check all
the saved JDKs to see whether they exist on the current system. If not, they will be
marked with the state "Path invalid" and can be safely ignored. In short, you can run
the instrumentation first from a Windows system and instrument your Windows JDKs, then
from a Unix system to instrument those JDKs and that information can safely coexist.
In case you don't have write permissions for this file, QF-Test will not be able to save the list of instrumented JDKs, but that shouldn't cause any trouble with the instrumentation itself.
|Last update: 12/12/2019
Copyright © 1999-2019 Quality First Software GmbH