Skip to content
Search and replace in HTTP actions feature review

Search and replace in HTTP actions feature review

The latest version of OctoPerf comes with an improvement to the Search HTTP actions: You can now replace values in the flagged HTTP requests actions!

How it works

You could already flag HTTP actions that match some search criteria, for example:

  • HTTP actions with a specific header's name,
  • HTTP actions with a particular query parameter's value,
  • POST requests whose content contains some data,
  • etc.

Search header by name

Need professional services?
Rely on our Expertise

Now you can directly update these HTTP actions by using the replace features:

  • Update the currently selected action by using the Replace button,
  • Update all flagged actions by using the Replace Flagged button,
  • Update ALL actions by using the Replace All button, available when no action is flagged.

Replace header by name

The search and replace can be used as any classic Search & Replace feature to replace a characters string by another anywhere in the HTTP request actions of the current Virtual User.

It also comes with more advanced capabilities for many use cases:

  • Replacing all resources HTTP request actions think times by a fixed value,
  • Removing an Authorization header to handle this by using the Basic authentication configuration on the request's server,
  • Replacing the value of a GET request query parameter to use a variable from a CSV file,
  • Activating the Download resources or Follow redirects options fo all requests,
  • etc.

Example : replacing a query parameter

Our goal here is to replace a specific query parameter's value. The query parameter is named 'categoryId' and we want to replace its value by ${category}, a variable we previously created.

The first step is to open the search Configuration panel by clicking on the cogs icon in the Search HTTP Action section. Then we need to use the advanced mode an configure:

  • The search term to EQUALS 'categoryId',
  • The search location in 'Query parameter name'.

When we close this panel the search is automatically executed and all actions that contain a query parameter with the name 'categoryId' are flagged. We can verify it in the Virtual User content:

Raw catalog GET action

Then we simply click on the Replace flagged button. The replace configuration window is automatically opened. Click on Add replace function then on Add query parameter.

A new replace function is added to the table. Select 'categoryId' for the name and ${category} for the value:

Replace configuration

Close the window and click on the Replace flagged button once again. All flagged requests are updated:

Parameterized catalog GET action

The Add query parameter and Add header replace functions can be used to add a new query parameter / HTTP headers but also to update existing ones.

To wrap up

The search and replace should allow you to save even more time compared to using JMeter or other tools. This is typically the kind of feature we want to continue adding to OctoPerf.

Want to become a super load tester?
Request a Demo