How to test the Show or List methodThis topic describes how you can test the public Show and List methods of a Business Object. Procedure To test the Show method, take the following steps:
To test the List method, take the following steps:
Refer to the following sections for more details. XML schema file request The following figure shows the XML schema file of the Request argument of the Show method of the Order (tlbct790) Business Object. Schema file tl bct bl790shrq0000.xsd tlbct790-Show-Request The following figure shows the details of the LogicalExpression and ComparisonExpression elements in the Request argument. Schema file tl bct bl790shrq0000.xsd tlbct790-Show-Request - continued The XML schema file of the Request argument of the List method is nearly equal: Schema file tl bct bl790blrsq0000.xsd tlbct790-List-Request The SelectionAndFiltering part is equal for the Show and List method. The difference between Show and List is that Show is working on one object that must mandatorily be filled in the XML message. Filtering is applicable not only for the List method, but also for the Show method, because you can apply filtering on the components, such as order lines, in a Business Object, for example: show order X, but give me only order lines with quantity greater than 1 and item equal to "some-item". Enter request Click Enter Request to define the Request argument for the Show method. If you click this button, a Graphical Browser appears, in which you must enter the object ID, for example, the order number, to be retrieved by the Show method: Save the Request argument and close the graphical browser to return to the BOL Test Tool - Public Layer (tlbct3250m000) session. Note For the List method, the Enter Request button is unavailable. The objects that the List method retrieves are determined purely by the filter specification. Refer to the following section for details. Define selection The selection is part of the XML Request argument. To define the selection, click Define Selection. The following Graphical Browser appears: The Graphical Browser lists all the attributes on which a selection is permitted. This list of allowed attributes is defined in the XML schema, which is part of the filterAttributeList. If you right-click an attribute, a shortcut menu with the following options appears:
Users can select attributes either one-by-one or all-at-once. To select attributes all-at-once, first close the SelectionList folder, and subsequently use the shortcut menu on the keyword SelectionList: The result if you click Select and subsequently open the folder is as follows: Close the Graphical Browser when you finish selecting attributes. The test tool stores your selection automatically. Define filter The filter is part of the XML Request argument. To create a filter, click Define Filter. The graphical browser for filtering starts. The graphical browser checks whether a filter is already defined for the current test case. If no filter exists, the following question appears:
Condition To create a condition, click Define Filter and click Condition. The following question appears: Select the desired operator. The boolean operator is required to link two conditions. If you choose And, you can always change this operator later to Or, and vice versa. As a result (default) two arguments appear in the Graphical Browser. You must fill each of these arguments. If you right-click an argument, a shortcut menu appears with the following options:
The result is, for example: If a comparison expression contains no data, this is reported by the Check Syntax command that is available on the Specific menu on the Menu Browser. The following message appears: "Comparison Expressions found that are not filled. Fill or remove empty Comparison Expressions."
All <Argument>'s must be filled or deleted. You can check this through the Check Syntax command that is available on the Specific menu on the Menu Browser. The following warning appears: "<Argument>'s found. Replace or remove." A possible complete filter is: If you run Check Syntax on this example, the following message appears: "Filter specification is correct." Note You can use the shortcut menu to change an And to an Or, and vice versa. In addition, you can also add an <Argument> folder. The following figure provides an example: Perform test After you create the Request argument, you can run the test. Click Execute Test. Refer to Execute test for more details. View response The following figure provides an example of a show result: View result The following figure provides an example of a possible error:
| |||