TransWikia.com

Display the Array in JMeter

Software Quality Assurance & Testing Asked by John Mark Castro on December 24, 2021

I would like to ask whether it is possible on JMeter to recreate the response on the web browser. Just some quick tip will do. Here is the response that it needs.

Image for the response for JMeter

My configuration is that I have a CSV file that contains all the ID i need. Then it is inside an Loop controller where I loop it for many times as I needed for selection.

Configuration

Hope someone can help me. Thanks

2 Answers

Here are the things that you are asking.

CSV Data Config screenshot

CSV file

Selection of Item to the system

Example of the HTTP Request

Answered by John Mark Castro on December 24, 2021

You cannot use Loop Controller for this as it will read one entry per Loop Controller's iteration.

If you want to create a request having many JSON objects originating from CSV file I would recommend doing it via JSR223 PreProcessor and Groovy language.

The Groovy class you're looking for is JsonBuilder.

If you need further help consider providing:

  1. Screenshot of the CSV Data Set Config
  2. At least first 2 lines of the CSV file as text
  3. At least 2 first JSON objects of the request as text

Answered by Dmitri T on December 24, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP