1
votes

I use JMeter 4, I have a problem in a JMeter JSON Path Extractor. I have done an HTTP Request (POST) to a service that I wan't to test.

Response data from the service is

{"rid":"661ff2d7-12e8-e811-8110-00215a9b9851",
 "participation":{"rid":"ed8cfced-0063-4fda-92fd-b23f50197797"}}

I wan't to extract the first GUID witch is allocated to the first rid.

As JSONPath Expression I have used $.rid and wan't to assign that value to a JMeter variable. Therefore I have checked the radio button JMeter variable and entered my JMeter variable which is int_rid.

When I execute my JMeter testplan the int_rid variable will be null.

1
You can upvote if the answer was helpfuluser7294900

1 Answers

0
votes

In JSON Extractor If you check the radio button JMeter variable it expect to search inside the contents of JMeter variable, which you don't want, usually Main sample only is enough

Main sample only - only applies to the main sample

Sub-samples only - only applies to the sub-samples

Main sample and sub-samples - applies to both.

JMeter Variable Name to use - assertion is to be applied to the contents of the named variable

Put int_rid in Names of created variables field and chose Match No. 1 to find the first value