You can allocate an execution adapter to run automated
tests by explicitly selecting the adapter, or by specifying that a
suitable adapter is selected at run time.
Automated test tools integrate with IBM® Rational® Quality Manager by
using adapters. Each adapter bridges between the test tool (IBM Rational Functional Tester, IBM Rational Performance Tester, command-line
adapter, for example) and Rational Quality Manager.
The adapter receives requests from Rational Quality Manager and
then runs tests on the machine where the test tool is installed.
You can specifically choose an adapter where the test runs, or you
can configure Rational Quality Manager to
search for the best available adapter at run time. In either case,
options are also available for recovery if no adapter is found, or
available at run time.
Types of execution adapter selection
You
can allocate an adapter to run automated tests in two ways:
- Explicitly selecting an execution adapter to run a test
- Specifying that a suitable adapter is selected at run time
Explicitly selecting an execution adapter to run a
test
If you explicitly select an execution adapter, you
identify the execution adapter before you start the test execution. You
can assign an adapter in several areas of the application, including
the Preferred machine field of a remote test
script, in an execution schedule, and in the Run Test Suite dialog
when you run a test suite. When you assign an adapter, you select
the most appropriate adapters that are based on adapter search criteria.
You can edit the adapter search criteria to update the list of available
adapters.
If you explicitly selected an adapter and scheduled
the test to run on a future date, that adapter might not be available
when the test run begins (the adapter may be deleted, re-registered,
or down). To help recovery, you can set a preference to search for
an alternative available adapter.
- Log in to Rational Quality Manager as
a project administrator.
- Click the Admin (
) icon in the upper-right
portion of the banner, and then click Manage Project Properties.
- Click the Execution Preferences section.
- Select the Search for other available adapter based
on applicable adapter search criteria, if assigned adapter is not
found option if it is not already selected. (This option
is enabled by default). Or, if you do not want your test to run on
an adapter other than the assigned adapter, clear the check box.
- Click Save to update the preference.
Specifying that a suitable adapter is selected at
run time
Allowing Rational Quality Manager to
dynamically determine a suitable adapter is a more flexible way of running
your automated tests. Adapter selection is postponed until when the
test must run, which minimizes the possibility that an adapter is
not available. Many factors are considered, including the adapter
health and adapter workload. Use this method of adapter selection
unless you must run a test on a specific machine. With dynamic adapter
selection, you can use resources more efficiently and avoid the manual
steps of selecting the adapter. For example, if your test suite has
ten or more automated test cases, you must manually select an adapter
for each test case.
You can specify that a suitable adapter
is selected at run time by running your test in these ways:
- Create an execution schedule that uses the Search Runtime option
for adapter selection.
- Run a test suite by using a test cell, which is a
group of lab resources. All adapters that are running on the lab resources
within a test cell are chosen for execution. This option works best
when you want to limit the group of machines that run an automated
test. This approach also helps to prevent the test bed from being
mixed with other environments.
The behavior of searching best adapter at run time is
influenced by these factors:
- Adapter selection criteria: You can configure this setting from
the Execution Preferences of project setting. By default Rational Quality Manager searches
for an adapter from all available adapters, but you can restrict the
search, for example, to only search for the adapters that are running
on specific test environments. Limiting the search helps ensure that
a test case execution record or test suite execution record that is
planned for a particular platform does not run on a different platform.
- Preferred machine: You can associate each automated test script
with a preferred machine. The adapters that are running on that particular machine
are given precedence over other adapters if they meet any selection
criteria, even if other adapters have a smaller workload.
- Search outside test cell preference: This preference is a useful
recovery mechanism when no adapter is found at run time within an
assigned test cell. By default Rational Quality Manager does
not search outside the test cell for an available adapter unless you
set this preference.
- Restrict reuse of lab resource if reserved for a Test execution
preference: If this preference is set, the adapter search does not
include lab resources that are currently reserved by a test case,
test suite, or test schedule.
Recovery when no execution adapters are available
If
Rational Quality Manager cannot
find an available adapter, the recovery behavior depends on the context:
- Test suite execution in parallel mode: If no adapter is available
for any step, an error message is shown and execution does not start.
- Test suite execution in sequential mode: The adapter for each
step is chosen only after the previous step is completed. If an adapter
is not found for a step, the step result is created with an "Error"
state and execution moves on to the next step.
- Test suite execution that uses the Stop suite execution
if any test does not pass option: If no adapter is found
for any step in the suite, the execution stops.
- A scheduled test suite execution: The overall state of the schedule
step result is set to “Error” for both parallel and sequential executions. For
a scheduled sequential execution, a test suite result is also created
with an “Error” state, whereas a parallel execution does not start
because an error condition is determined before the execution can start.
If the chosen adapter goes down in the middle of a test run
(for example, the adapter crashed, the machine went down, or there
were network issues), you can transfer the execution to another available
adapter from the Execution Console:
- Open the Execution Console by clicking in the main
menu.
- In the list of execution tasks, identify a task for which you
want to change the adapter.
- Select the row for the execution task and click the Edit
Adapter icon (
). An adapter selection dialog box opens.
- Select an available adapter and click OK.
The execution task is transferred to the adapter that you selected.
Best practices for execution adapter selection