0

I need to pass two different parmeters, That is RideNumber and RideId from response of one api to other two different api's. Tried to keep two different regular expression extractors but did not work.

I tried by keeping two Regular expression extractors and one Beanshell Assertion. but output is taking only one parameter and another is empty.

Devi
  • 1
  • 1
  • Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. – Community May 20 '23 at 23:51

1 Answers1

0
  1. Regular Expression Extractor is not the best option to fetch something from an API response. Neither JSON nor XML are regular languages so I would rather suggest:

    in any case make sure to use different reference names in both Post-Processors otherwise the value will be overwritten.

  2. Since JMeter 3.1 it's recommended to use JSR223 Test Elements and Groovy language for scripting so consider migrating as Groovy has much better performance. In general I fail to see why you would need to use Beanshell Assertion there, if you want to use extracted data in another HTTP Request sampler just use the JMeter Variable like ${your-variable-reference-name-here}

Dmitri T
  • 159,985
  • 5
  • 83
  • 133