Previous Topic: Add a Filter from a JDBC Result SetNext Topic: Drag and Drop a Filter


Add a Filter from a Returned Java Object

When the test step result is a Java object, you can use the Inline Filter panel in the Complex Object Editor to filter the returned value directly from the method call.

This example uses the Get User step (EJB step) in the multi-tier-combo test case in the examples directory.

Follow these steps:

  1. To open the step editor for the Get User step, double-click the step.

    Step editor for Get User step in multi-tier-combo test case

  2. Click Next. On the next window, click Finish.

    Get user step Object Editor

  3. To open the Object Call Tree, click Show Editor.

    Object Call Tree

  4. Enter an input parameter "itko" in the value field.
  5. Click Execute to execute this method.

    The returned value upon executing the getLogin method is stored in the property getUserObject. Notice that in this case the returned value is an object (of type UserState). You also can add an assertion here.

  6. Select the Expert Mode check box.

    The Call tab displays the filter parameters.

    Object Call Tree Expert Mode

You could also call a method on the returned object to get the login value for this user, and save the login in another property.

Inline filters (and assertions) do not result in a filter being added to the test step in the element tree. Inline filter management is always done in the Complex Object Editor.

For more details on the Complex Object Editor, see Complex Object Editor in Using CA Application Test.