Content Modifiers

Configuring replacement of part content is performed from the Fields View. If an HTTP request contains the content-type multipart/related, it is displayed in the Fields View with type part. For other styles of HTTP requests, such as those that post a single raw content block, that block will be displayed in the Fields View with type Message body.

 

Double clicking on the field opens a dialog where the replacement data is specified.

 

The replacement configurations allowed are:

  1. Replacing the entire content of the part from a file or dataset field.
  2. Replacing multiple smaller sections of the part from datasets or user variables.

 

Partial content replacement

If only some sections of the field require replacement, double-click the field or choose Edit... from the pop-up menu in the Fields view.

Adding the modifier

Open the Field Editor dialog and select the Text with replaced regions datasource

 

 

The dialog changes to display the content - the lower text area is used to select the sections of text to be modified. Select the section of text to be modified and click the add button () to add a modifier.

 

 

A new dialog is displayed where the dataset or user variable to use for the replacement must be specified. Make the selections on this dialog and press the OK button to create the modifier.

 

 

The modifier is now shown on the original dialog. Additional modifiers can be specified by repeating the previous step. Once all desired modifiers have been configured, press the OK button to add the modifiers to the testcase.

 

Removing a modifier

To remove a modifier, re-open the field editor dialog from the FieldsView. Place the cursor within the selection or select one or more characters of the characters to be replaced. The delete button () will become enabled. Press it to remove the modification on that section. Press the OK button to make the change to the testcase.

 

 

 

Entire content replacement

When replacing the entire content during a load test, the files to be used for data replacement can be specified in a dataset. The files must be imported into Load Tester through the File Uploads preference page. See the section on uploading files for a detailed explanation on using the preference page and creating a dataset.

Adding the modifier

Once your dataset is created, use the Fields View to open the dialog to edit the field. Select the File Upload datasource.

 

 

Select the Dataset value button, and select the Dataset and field which contain the replacement information for this part. If the new values for each part are each in their own file, and configured through the File Uploads Preferences, then the option "Dataset or User Variable indicates name of file to upload" should be checked. Otherwise, if the Dataset contains exactly the values to be used during playback, this option may be left unchecked.

 

 

After pressing OK, the new field configuration is shown in the Fields View:

 

 

Removing the customization

To revert the configuration of the field to the recorded value, re-open the dialog from the FieldsView, select the Recorded datasource and press OK.