Testing or debugging sometimes can be difficult if necessary backends are not available. The Embedded xUML Runtime offers the possibility to mock backend access. The xUML Runtime does not access the backend, but just returns predefined data.

Select Mock Backends Manually from the context menu of a test case of a service using backends. The screenshots are taken from an SAP example.

Example File (Builder project Add-ons/SAP):

<your example path>\Add-ons\SAP\uml\sapRFCClient.xml

The Test Case Properties dialog opens and shows an additional tab Mock Backends containing a list of all port types and their backend adapter usages in the corresponding UML model.

Check the checkbox in front of the backend adapter usage corresponding to the test case and expand the tree. Create the return objects and fill in the values to be returned by this adapter call as described for test cases.
 

Finish the editing by clicking OK.

Using the Analyzer it is possible to load backend return values from a previous run into the mocking feature. This is particularly useful if having a backend interface with many objects or attributes.

Related Pages:
  • No labels