Applies to ReadyAPI 2.7, last modified on May 14, 2019

The AMF panel is used to configure AMF request.

Parameter Editor

You modify and configure request parameters in the Parameter editor.

The Parameter editor

Click the image to enlarge it.

The editor lists the parameters in a tabular form:

Column Description

Name

The parameter name. You can use the Get Data dialog and property expansion to enter a value.

Value

The parameter value. You can use the Get Data dialog and property expansion to enter a value.

The editor has a toolbar with the following commands:

Command Description

Add

Adds a new parameter to the table.

Remove

Removes the selected parameter fromn the table.

Up

Moves the selected parameter one row up.

Down

Moves the selected parameter one row down.

Clear

Clears all parameter values from the list.

Load from file

Loads parameter values from a file to the list.

Save to file

Saves parameter values to a file.

Script Panel

Use the Script editor to create script that modifies request’s parameters before send the request. It is useful when you need to pass an object or an array to the parameter.

AMF Script panel

Click the image to enlarge it.

The code has access to the following scripting objects:

  • log – The global log object.

  • context – An object that provides an interface to the current test run context.

  • parameters – The associative array whose elements match the specified request parameters.

  • amfHeaders – The associative array whose elements match the specified AMF headers.

The following code snippet demonstrates key steps in creating code for generating objects:

Groovy

// 1. Include needed libraries
import flex.samples.product.Product

...

// 2. Call statements that create the needed object or array
def myObj = new MyObject(1, "someProperty", "someOtherProperty")

...

// 3. Add the object to the request
parameters["myParamName"] = myObj

See Also

AMF Request Test Step
Top Request Panels

Highlight search results