In order to run tests, you need to identify the environments in ATG Search Administration that contain the products and SKUs you want tested. When you are testing deployed assets, the search configurations and facets (as well as other search settings) used in the tests are also from the environment you specify. Otherwise, your tests involve the search configurations and facets from the active project (and products and SKUs from the specified environment) .

Each environment with data that you want to test needs to be represented by a Search Testing environment component that is registered in the Search Testing Service component. The default configuration provides a Search Testing Service component and two Search Testing environment components, which you should modify so that they are appropriate for you installation. You can add environments (as described in Specifying Search Testing Environment Components) and disable them (see Managing Environments in the Search Testing Service) as needed.

Specifying Search Testing Environment Components

You use the Search Testing environment components to represent the environments in the ATG Merchandising UI that are used by ATG Search Administration. ATG provides two instances of this component – Production Environment and Staging Environment – to represent your live site and testing environments, respectively. These components are usable only after you’ve updated them with values relevant for your site, as follows:

  1. Find the component that you want update in /atg/search/testing.

  2. Update the searchEnvironmentName property, which holds the name that ATG Search Administration uses to identify this environment.

    You can view a list of your environments by following the instructions in the Viewing Search Environments section of the Managing Search Environments chapter in the ATG Search Administration Guide.

  3. By default, Search Testing uses the component name of the environment in the UI. To provide a different name:

    • If you haven’t localized ATG Merchandising, specify the environment name directly to the Search Testing Service displayName property.

    • For localized installations of ATG Merchandising, provide the name of your resource bundle to the formatter property and the key that will be used to identify the environment to the displayNameResourceKey property. Then update your resource bundle to map the key to the actual name, such as atg.search.environment.production="Production".

  4. Save your changes.

To create additional components, create a globally-scoped instance of class atg.repository.search.testing.SearchTestingEnvironment, providing values to the properties described above, and save them to the /atg/search/testing directory.

Managing Environments in the Search Testing Service

The Search Testing Service specifies the testing environments available to the ATG Merchandising UI. Configure the following properties for the Search Testing Service located in the /atg/search/testing directory:

 
loading table of contents...