Query Test Case Definition
A Query Test Case consists of a number of Query Variants. If you click on the Variants button a screen for the Query Variants selection is displayed.
Creation of Query Test Case
Query Test Case variant selection screen
The Query variants selection screen allows you to create new or add existing Query Variants into a Query Test Case. All functions are accessible from the toolbar menu.
Create new Query Variant
The screen for creating a new Query Variant is accessible by clicking on the Create new Query Variant button (Shift + F1).
Creating new Query Variant
In this screen you can define:
- RFC Destination – RFC destination of the Query Variant. When the RFC destination is specified using F4 help, this will display the query name values from the specified destination system. RFC with F4 help is only available if the dialog RFC connection (does not need to be the same as the filled one) is available in the system in the specified RFC destination.
- Query name (required) – the technical name of a query. F4 help is available for this field.
- Query Variant Description – you can add a description for the new Query Variant.
- Set query variables – you can specify the filtering values (if any) for a query. For RFC Query Variants there is the possibility to specify the filtering values that are available only if the dialog RFC connection (does not need to be the same as filled one) is available in the system to the specified RFC destination and SNP Validate is also installed on the RFC destination system.
Query Filters
5. After image variant – Query/Bookmark Variant ID enables you to compare the outputs for different queries or for the same query on a different system. This can be executed instead of the variant during the creation of an after image.
6. (hidden) Run as a different user - Click on the Advanced Settings, an option to run the query as a different user is displayed. Query execution under a different user may serve to check user authorizations to access data. When the field is left empty, the variant will be executed with the current user. The setting is hidden by default, visibility of this setting can be changed in expert settings.
To save, click on Continue (Enter) and the Query Variant is saved. Various checks are done to ensure the correctness of a variant definition before the Variant is saved.
If different Query/Bookmark Variants are specified for the after image creation then the following rules apply, in order for outputs to be compared. Both of the compared query/bookmark variants must have exactly the same structure of columns/rows to allow SNP Validate to compare them. If the structure of the variants differs, then the correctness of the comparison cannot be guaranteed.
By double-clicking on a created Query Variant, you can reenter the dialog and edit the variant properties. However, it is not possible to edit variant properties, if this variant is already in use for another Test Run.
Create New Bookmark Variant
Create new Bookmark Variant
Screen for creating a new Bookmark Variant is accessible by clicking on the Create New Bookmark Variant button (Shift + F2). In this screen you can define:
- RFC Destination – RFC Destination of a system on which the bookmarked query is run. SNP Validate must be installed on the RFC destination system in order to successfully create RFC-enabled Bookmark Variants.
- Bookmark ID (required) – identification for the query bookmark. Bookmarks that were also created with data can also be used here. In such a case, the bookmarked data is not being read from the bookmark; only the query is executed using the bookmark structure information.
- Bookmark Variant Description –to specify the description for a new Query Variant.
- After Image Variant – Query/Bookmark Variant ID that is executed during the creation of after image. This allows you to compare outputs for different queries or even the same queries on different systems.
The Query Variant is saved when clicking on Continue button (Enter); before saving is complete various checks are performed to ensure the correctness of variant definition.
Add existing Query Variant
By clicking the Add existing Query Variant button, a list of all the existing Query Variants in the system is displayed. Here you can select your set of variants and by using the Copy button (Enter) these are added to the list of selected variants. Please note that each Query Variant can only be used once for each Test Case.
Add Query Variant from Test Run ID
By selecting a test run and clicking the Add Query Variants of Run button a list of all the existing Query Test Runs is displayed and you can add all the variants used in the selected run into to the Test Case variant selection.
Copy Query Variant from Test Run ID
By selecting a test run and clicking the Copy Query Variants of Run button, a list of all the existing Query Test Runs is displayed and you can add all the variants used in the selected run into to the Test Case variant selection as copies.
Create Based on Web Template
You can also create Query Variants for all of the queries used in the specified Web Template, to do this you can click on Create Based on Web Template button (Shift + F8).
Selection of Web Template
In this screen, you can define the Web Template ID and after clicking on Continue button (Enter) the Web Template is searched for all used queries. These queries are presented in a table afterward and in this table, you can choose the queries to be generated for the Query Variants by using the checkboxes.
Queries of Web template
For each selected query you are presented with the standard Create New Query Variant screen where you can define or change the prefilled variant values.
Generate Web Template Bookmark Variants
To create Query Variants based on Web Template Bookmark you can click on Gen. Web Template Bookmark Variants button.
You can create Query Variants based on specified Web Template Bookmarks, click on Gen. Based on Web Template Bookmark button (Shift + F12). The Screen for Web Template Bookmark ID selection is then displayed.
Selection of Web Template Bookmarks for Query Variant generation
Afterward, click on Continue button (Enter); each Web Template Bookmark selected is searched for all the used queries. For each query found a new Query Variant is created. All the Query Variants filters are filled with the corresponding filtering values from Web Template Bookmark they were found in.
If a change was done in Web Template regarding the drill down in query results (i.e. change in displayed columns/rows) this change is also reflected in the output of the query in backend testing.
Once the Query Variants have been selected, click on the Continue button (Enter), to save the Variants selection for the Query Test Case and click on the Ok button (Enter) in the Test Management.
By selecting the variants from the list and from the context menu additional options are displayed where you can access the following functions:
Add Variants of Test Case
By clicking the Add Variants of Test Case button a list of all the existing Query Test Cases is displayed and you can add all the variants used in the selected Test Case into the Test Case variant selection.
Copy Variants of Test Case
By clicking the Copy Variants of Test Case button a list of all the existing Query Test Cases is displayed and you can add all the variants used in the selected Test Case into the Test Case variant selection as copies.
Create After Images as copies
Select multiple variants and create after image variants from them. To access this functionality you need to choose the selected variants in the context menu and then choose Create After Images as copies. A Dialog is displayed where you can define the RFC destination that will be applied to all generated after image variants. All other settings are copied from source variants.
Create After Image Variants as copies
Compare Settings
You can compare the chosen settings for the variant with its defined after image variant (if there is one). Select the requested variants and choose Compare Settings option from the context menu.
Compare settings of before and after image variant
It is possible to check the settings and you can choose what should be compared between variants. After you confirm the selection check is done and the table with compare status messages is displayed.
Copy Settings
You can copy the settings of the variant to its defined after image variant. After the selection of variants is done you can choose Copy Settings context menu option. A dialog is displayed where you can define which settings should be copied and the source variant for after image variant (if there is any).
Copy settings of the variant to its after image variant
After you confirm the selection, the specified settings are then copied and a message table is displayed with information about updated variants.
Copy Query Variants
You can create copies of Query variants by selecting multiple variants in the selection table and clicking on
Copy Query Variants toolbar button. For each selected variant a new variant is created with exactly the same settings as the source variant. If a copied source variant has a different after image variant specified a copy of this would also be created. The copied after image variant is then assigned to the copied source variant as its after image variant.Copy Variants
Generate Query Variants
This functionality is available, only if the Query Statistics is already installed on the system. After clicking on the button Generate Query Variants , the screen displayed is where you can define which InfoProvider and Query selection are to be searched for in statistics.
Specification of filter for queries search
After a filter is specified (optional) you can click on the Continue (Enter) button. The next screen displays the information about queries that are present in Query Statistics and the number of times the query was executed in the system.
You can generate the Query Variants from these statistics by selecting queries and specifying the number of variants to be created for each of the selected queries. This number only specifies the maximum number of variants that are to be generated. If there are not enough distinct (in terms of used filters) query executions in the statistics, then fewer Query Variants are generated. Variants are then generated after clicking on Continue button (Enter).
Generation of Query Variants
Create Variants of Web Templates
You can also create Query Variants for all of the queries used in the specified Web Template, to do this you can click on Create Based on Web Template button (Shift + F8).
Selection of Web Template
In this screen, you can define the Web Template ID and after clicking on Continue button (Enter) the Web Template is searched for all the used queries. These queries are presented in a table afterward and in this table, you can choose the queries to be generated for the Query Variants by using the checkboxes.
Queries of Web template
For each selected query you are presented with the standard Create New Query Variant screen where you can define or change the prefilled variant values.
Generate Web Template Bookmark Variants
You can create Query Variants based on a specified Web Template Bookmarks, click on Gen. Based on Web Template Bookmark button (Shift + F12). The Screen for Web Template Bookmark ID selection is then displayed.
Selection of Web Template Bookmarks for Query Variant generation
Afterward, click on Continue button (Enter); each Web Template Bookmark selected is searched for all the used queries. For each query found a new Query Variant is created. All the Query Variants filters are filled with the corresponding filtering values from Web Template Bookmark they were found in.
If a change was done in Web Template regarding the drill down in query results (i.e. change in displayed columns/rows) this change is also reflected in the output of the query in backend testing.
Copy Query/Bookmark Variants
To create a copy of the existing Query/Bookmark Variants select the rows with the variants you want to copy and then click on the Copy Query Variants button in the toolbar of the table, for each selected Query/Bookmark Variant a copy is then created.
Edit Query/Bookmark Variant
You can edit the existing Query/Bookmark variants by double-clicking on them in the table, only Variants that are not used in other Test Runs can be edited. If Query/Bookmark Variant is already used in another Test Run it's details can be only reviewed but not changed.
When variant details are displayed you can check where this variant is used, by pressing the Where Used button; a table is displayed that contains all Test Plan/Test Case/Run ID information where this variant is used.
Where Used List for Variant
By clicking on Copy Settings to After Image button you can copy specified settings of this variant into its after image variant if it is specified.
Mass Edit Variants
You can edit more Query/Bookmark variants at once, by selecting the required variants from the list and clicking on the Mass Edit Variants
button. Dialog for mass edit of variants is displayed.
Mass Edit Of Query Variants
You can define new values for the before and after image RFC destination. Changing of these values is done after clicking on Continue (Enter) button. By marking the Edit checkbox only the values, which you specify to be changed, will be replaced in selected variants. If Query/Bookmark variant has a different After Image specified the After Image RFC destination will be replaced in that variant otherwise there will not cause any change. Only variants that are not yet used in test runs can be changed by mass edit.
You can also change the filter values used in selected Query variants with the following steps:
- Select checkboxes to confirm that you want to apply changes to the selected variants. Click on a Filter Values button to define new values of the InfoObject filters which are used in the queries.
- This functionality enables you to define various change rules for before and after image query variants. You need to define the required mapping of filter values based on InfoObjects.
- Confirm the execution of mass editing by clicking the Continue button.
- This step adjusts the filter values of queries based on the specified rules.
Important notes for mass edit of Query variants filter values:
- Query filter values are changed based on an InfoObject. When a query contains two variables which are based on the same InfoObject, in the case of mapping, both will be changed.
- Filter values of queries are changed on a value level. If a Query variant contains for example a range selection (I BT 2006 2007) and mapping is defined for value 2007 => 2008 only the upper boundary of range filter will be changed (I BT 2006 2008). If the same mapping would be used but the previous range filter would change to (I BT 2006 2010) mapping would not be applied.
- Mapping values of filters should be defined in a user-readable format (the same format as is used by executing queries in RSRT transactions). The functionality automatically applies correct conversion exits to convert the mapping values to a machine-readable format.
- Already used query variants in other runs can't be changed using this functionality, as they can't be changed manually.
Additional options available from (DV-2211) Variant Editor:
Variant editor
(DV-2211) Variant Editor provides a central location where you can manage all the backend-testing variants.
Transport Query/Bookmark Variants
It is possible to add specified Query Variants to transport so they can be transferred to another system (with SNP Validate installed). To specify which Query/Bookmark Variants should be transported you need to select these from a list as shown in the picture below. Options for filtering and sorting in the ALV table can be used to select specified Query Variants more easily.
Selecting Query Variants to be transported
After selecting the desired Query Variants click on the Transport Query Variants button, a dialog is displayed, where you can select a request and confirm the transport for the selected Query Variants.
Export Query Variants Request Dialog
It is important to note that Query Variants carry information about the query names and filtering values, but not the query structures themselves; therefore these should be imported only to a system where SNP Validate is installed and where the same queries with the same structure exist.
Delete Query/Bookmark Variants
To delete an existing Query/Bookmark Variants, select the rows and then click on the delete button in the ALV toolbar.
Any Query/Bookmark Variants that are still in use in the Backend Testing will be locked; therefore it is necessary to delete the Query Variants from the in the run before deleting them permanently from the Query Variant Editor.
Cleanup Query Variants
You can delete all unused Query variants by clicking on
Cleanup Query Variants button. The first screen displays a preselection of filters of the variants where you can restrict which variants should be checked for deletion. After you confirm this screen check is performed to find all unused variants. A variant is unused if it is not assigned to any Test Case or Test Run. If a variant is used in another variant as an after image variant and that variant is used in any Test Case or Test Run it is evaluated as used on not presented for deletion.Query Variant Cleanup Preselection
All variants evaluated as not used are then displayed in the dialog window. When you confirm the selection in this window the variants are deleted from the system.