Speeding OctoPerf’s Virtual Users design by using the new Search And Replace feature. design , search , csv , http https://octoperf.com/blog/2017/06/15/search-and-replace-http-actions/ OctoPerf ZI Les Paluds, 276 Avenue du Douard, 13400 Aubagne, France +334 42 84 12 59 contact@octoperf.com Innovation 493 2021-01-04

Search and replace in HTTP actions feature review

OctoPerf is JMeter on steroids!
Schedule a Demo

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
Search header by name

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
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
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
Replace Configuration

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

Parameterized catalog GET action
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. Feel free to use the comment section to suggest anything else that comes to your mind, and of course share your feedback.

Search and replace in HTTP actions feature review
Tags:
Share:

Be the first to comment

Thank you

Your comment has been submitted and will be published once it has been approved.

OK

OOPS!

Your post has failed. Please return to the page and try again. Thank You!

OK

Want to become a super load tester?
OctoPerf Superman