Creating a Configuration Template
The JavaTest harness provides users and site administrators with the ability
to create configuration templates that can be used to run tests on multiple
test systems or test platforms with minimal changes. Users can save any configuration as a template (including configurations with unanswered questions).
See Create a Configuration Template from an Existing Configuration or Create a Configuration Template as a New Configuration.
For example, if a test group uses a central location to provide and manage the
resources required to run tests (the test suite, report directories, configuration
files, or the JavaTest harness), a site administrator or user can create a
configuration template that contains all known configuration values required
by the test group to run tests. Each user can load the configuration template
from the central site, provide only those values unique to their test environment
or test run, and run their tests using their completed configuration.
Use Bookmarks to simplify a configuration template by displaying only the questions that require information from the user. Normally long interviews can often be reduced to a small set of required questions through the effective use of Bookmarks within a configuration template. See Setting Bookmarks in a Configuration.
Configuration templates are created by choosing File and Save As Template from the Configuration Editor menubar. The Configuration Editor opens the Save Configuration Template dialog box.
See Save Configuration Template for detailed information about the dialog box.
Save Configuration Template
The Save Configuration Template dialog box allows site administrators or users to creat configuration templates.
The Save Configuration Template dialog box enables site administrators or users to set the following options when creating a template:
-
File - A text field that specifies the location and name
of the saved template. Click the Browse button to open a file chooser that enables
navigation to a template directory. Templates are saved using the same
.jti
extension
as a standard configuration file.
-
Save Test Suite Path - If selected, the path to the test
suite remains associated with the configuration template. Each time the template
is loaded, the JavaTest harness also loads the associated test suite. If Save
Test Suite Path is not selected, the template is not associated with a specific
test suite. Each time the template is loaded, the user must specify a test suite.
-
Save Work Directory Path - This option is only enabled
when the Save Test Suite Path option is selected. If selected, the work directory
remains associated with the configuration template. Each time the template is
loaded, the JavaTest harness also loads the contents of the work directory unless
the work directory is already open or specified. If Save Work Directory Path
is not selected, the template is not associated with a work directory. Each time
the template is loaded, the user must specify a work directory before running
tests.
-
Enable Bookmarks - Bookmarks allow site administrators
or users to mark questions that require additional information from the user
or that should receive attention. If selected, all bookmarks are saved with the
template. If Enable Bookmarks is not selected, any bookmarks set in the configuration
are not saved with the template.
-
Show Only Marked Questions - This option is only available
when the Enable Bookmarks option is selected. Bookmarks allow site administrators
or users to simplify the appearance of a template by displaying only those questions
that require additional information. If selected, each time the template is loaded
the configuration interview only displays questions that are bookmarked. Users
can display all questions in the configuration interview by changing the settings
in the Configuration Editor. This option is useful in reducing lengthy interviews
to a small number of questions and values.
If Show Only Marked Questions
is not selected, all questions are displayed in the Configuration Editor.
-
Clear Answers to Bookmarked Questions - If selected,
the answers to all bookmarked questions are cleared when the template is saved.
This allows site administrators or users to require that users provide answers
for bookmarked questions before running tests. If Clear Answers to Bookmarked
Questions is not selected, any answers in bookmarked questions are saved with
the template.
The cleared state may appear blank, unanswered, or may also be the default answer provided by the test suite.
Create a Configuration Template from an Existing Configuration
Users can create a configuration template from an existing configuration by performing the following steps:
-
Click the
button on the toolbar or choose Configure -> Change Configuration -> Other Values from the Test Manager menu bar.
-
If the configuration is not displayed in the Configuration Editor window, choose File -> Load from the menu bar to load the configuration to be used in creating the configuration template.
-
The Configuration Editor window displays questions in the center pane (the Question Pane).
Click the Next button to proceed to the next question in the configuration. Use the text box, radio button, or combo box controls located beneath the question to change any configuration information required for use as template.
-
If a user is only expected to answer or change the values of certain questions, use the Bookmarks menu to mark each question that a user is expected to answer. See Setting Bookmarks in a Configuration.
-
After all questions have been answered and marked, choose Bookmarks -> Show
Only Marked Questions from the menu bar to display only the questions that have
bookmarks.
Examine the result and verify that the bookmarked questions are the minimum
set of questions a user must answer. This is what the user sees when the
template is loaded in the Configuration Editor.
-
After all changes have been made to the configuration values, choose File -> Save as Template from the menu bar.
-
In the Save Configuration Template dialog box choose the options for the configuration
template and click the Save button. See Save Configuration Template for detailed information about the available template options.
Create a Configuration Template as a New Configuration
Users can create a configuration template from a new configuration by performing the following steps:
-
Open an empty Configuration Editor window by choosing Configure -> New
Configuration from the Test Manager menu bar. You can also open an empty Configuration
Editor window by clicking the
button
on the toolbar and choosing File -> New Configuration from the menu
bar.
-
Create the new configuration file by answering the questions displayed in the
Configuration Editor window.
The Configuration Editor window displays questions in the center pane (the Question
Pane).
Use the text box, radio button, or combo box controls located beneath the question
to provide the required configuration information. After you answer a question,
click the Next button to proceed to the next question.
-
If a user is only expected to answer or change the values of certain questions,
use the Bookmarks menu to mark each question that a user is expected to answer.
See Setting Bookmarks in a Configuration.
- After all questions have been answered and marked, choose Bookmarks -> Show
Only Marked Questions from the menu bar to display only the questions that
have bookmarks.
Examine the result and verify that the bookmarked questions are the minimum
set of questions a user must answer. This is what the user sees when the
template is loaded in the Configuration Editor.
-
Choose File -> Save as Template from the menu bar.
-
In the Save Configuration Template dialog box choose the options for the configuration
template and click the Save button. See Save Configuration Template for detailed information about the available template options.
- After the template file is created, use the operating
system to mark it read-only so that users cannot accidentally overwrite
it.
When a user loads a configuration template, the Configuration
Editor does not save it as a different file. If it is loaded from
a central location the user must either copy the .jti
file before
loading it or save it to a new location immediately after
it is loaded.