Testing Services with the Service
Browser
You use this function to execute and test services created in the Composite Application Services (CAS) plug-in to SAP NetWeaver Developer Studio. The service browser is a user interface accessed through SAP NetWeaver.
You have created services with the service modeler of CAS. To access the testing tool, go to: http://<host>:<port>/caf → Test Tools → Service Browser.
The service browser is divided into two parts:
● Available services
● Data component
The Available Services window lists all service projects created in CAS, including the Composite Application Framework (CAF) core project. By expanding the services tree, you can see all operations available for testing. You can test service operations in the Data Component view.
In the Data Component view, you can test operations created using the service modeling tool in CAS. However, the content of the view changes depending on operation parameters.
Under Data Component, you can use the commands New, Delete, and Save to create, delete, or save an instance in the testing process. Other commands can appear in addition to New, Delete, and Save depending on the operation.
You can see the operation name as part of the Current Result Aspect table heading. The business object instances, which result from the testing of operations, are listed in the Current Result Aspect table. The column headings of the table are the attributes of entity or application services created using the service modeler.
If you activate Process relations and service instances have been modeled to use referenced entities, then the following fields will be enabled:
● Available actions for result aspect
You can see the available actions for the result aspect by looking at the findBy methods. Execute action is the command used to execute aspect actions.
● Available relations for result aspect
You can see referenced entities to your object in this field if they were modeled in the service modeler. You can use these references for further testing. To select aspect relations, choose one of the following:
○ Choose Go to related aspect
OR
○ Go to previous aspect
● Related key
You can enter a related key to search for instances from different services that have the same attributes. You can then do one or more of the following within the table:
○ associate or disassociate relations
○ create or delete related rows
If you are using an operation, which uses the findBy operation, Execute query appears at the top of Data component in addition to New, Delete, and Save. You can enter an attribute to search for a specific instance as a query parameter. You can see the results of your search in the Current Result Aspect table.
The column headings are the service attributes used in the operation. The following constraints are for creating new instances:
Column |
Description or Constraint |
key |
Fixed length of 36 characters |
lastChangedAt |
Format is: YYYY-MM-DDTHH:MM:SS.SSS |
createdAt |
Format is: YYYY-MM-DDTHH:MM:SS.SSS |
An added feature of testing your services is the ability to improve debugging before implementing the application. When the service browser reports an error, you can double-click the error message in the status line. A new screen will pop-up and display the complete stack trace of the error.