Search Test Repository Actions

Search Test Repository actions search the specified Test Repository to find test assets that match a supplied set of tokens. for example, a set of SAP transaction codes. In the case of Tosca Test Repositories, both SapEngine and API modules are searched to find matching test assets. In the case of Tosca Test Repositories, the TBox and Classic SAP automation engines are searched for matching test assets, and reusable test blocks are included in the search. In the case of qTest Test Repositories, both standard and custom test case fields are searched to find matching test assets.

The action returns the set of matched test assets, along with IDs that may be used by the Create Test Execution action.

Action Property Description
Result A Table dataset containing details of the matching test assets.
Search Paths

If this String List parameter or dataset is set, the search for test assets is limited to the specified workspace or project folders. For example, if you have a test plan hierarchy like this…

Subject\Release 1

A

B

Test1

C

D

Test2

Subject\Release 1

E

F

Test3

G

H

Test4

… and you wish to search only the ‘Subject/Release 2’ portion of the hierarchy, set the Search Paths parameter to ‘Subject/Release 2’.

The string 'Subject/' is added if it is missing from the beginning of the search path, and any trailing backslash characters are removed. Setting the Search Paths parameter appropriately can significantly reduce the time it takes to search for relevant test assets.

If Search Paths are specified for Tosca Test Repositories, at least one of the Search Paths must be at the start of the node path in order for matches to be found. Suppose you have the following hierarchy...

Test Cases

Sales

VA01 - Create Sales Order

... and another test case that references VA01 in a different folder path. Setting Search Paths to /Test Cases/Sales will match only the first instance of VA01, because its node path (/Test Cases/Sales/VA01 - Create Sales Order) starts with the value in Search Paths.

For qTest Test Repositories, each Search Path must begin with a leading ‘/’.

For Tosca Test Repositories, if the Use Cache property is set to ‘false’, each Search Path must begin with a leading ‘/’.

‘Subject/’ is added to the beginning of each Search Path if the Use Cache property is set to ‘true’.

For Excel Test Repositories, the Search Paths property is not used.

Source A Table parameter or dataset used to specify the tokens to be searched for in test assets. The table should have a single column named TOKEN. Each table row should store a single token.
Test Repository A Test Repository parameter or dataset referring to the Test Repository to be searched for test assets.
Use Cache

If this Boolean parameter is set to ‘true’, the Search Test Repository action uses any cache associated with the specified Test Repository when searching for test assets. If the property is set to ‘false’, the Test Repository cache is not used. If this parameter is not set, ‘true’ is used as the default value.

A cache may be created for a Test Repository using the Write Test Repository Cache action.

The Search Paths property is not used in some cases, as described below:

Test Repository Type Is Search Paths Used When Use Cache = true? Is Search Paths Used When Use Cache = false?
Tosca Yes Yes (see below)
qTest Yes Yes
ALM Yes Yes
Azure DevOps Yes No
Certify Yes No
Excel No No
SAP Solution Manager Yes No

The Search Test Repository action uses a two-phase search when searching Tosca Test Repositories.

  1. It searches all the modules that refer to the tokens in the Source table. It then finds all the test cases that use the matched modules (regardless of their paths).
  2. It searches the paths in the Search Paths string list to find additional test cases that directly refer to the tokens.

This means that if Use Cache is set to false, searching a Tosca Test Repository may return matching test cases that are not in any of the specified Search Paths.

The Result dataset has the following columns:

Column Description
TOKEN The matching token from the Source table’s NAME column. Tokens that match within word boundaries are not included in the results.
TEST_ID The ID of a matching test asset.
TEST_NAME The name of the test asset.
TEST_PATH The test asset’s path. Note that if a matched token contains path separators, these will be escaped and stored as \/ in the test path.
WORKSTATE For Tosca Test Repositories, this column is set to the workstate associated with the test asset.

By default, the Search Test Repository action does not search disabled Tosca test steps or values to find matching test assets. To allow disabled Tosca test steps and values to be searched, carry out the following steps:

  1. Use the Define Action Parameters Wizard to add a new Boolean input parameter named SearchDisabledSteps to the Search Test Repository action.
  2. Set the parameter’s value to true.

Tosca Test Repositories

For live Tosca Test Repository searches (where the Use Cache property is set to ‘false’, the Search Test Repository action checks the specified Search Paths to verify that:

  • All parts of each Search Path are valid.
  • Each Search Path is synchronized in the Tosca workspace.

If either test fails, the action returns a suitable error message.

For Tosca Test Repositories, the Search Test Repository action returns test cases that match one of the workstates specified in the associated repository definition. If no workstates are listed in the Test Repository’s Workstates field, the action returns all matching test cases, regardless of their workstate.

Example:

Search Test Repository action example.

Test Repository Integrations

Read Test Repository Cache Actions

Write Test Repository Cache Actions