Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How do I make parameters dynamic, reacting to the unique server responses of each test run?

0
Posted

How do I make parameters dynamic, reacting to the unique server responses of each test run?

0

You can use the Regular Expression Post Processor to extract a value from a response, and then reuse this response in another request. Looking at the previous question in this FAQ, you could extract the product id from the result and use it in the following request: • Load Test Plan created in previous FAQ question • Add Post Processor > Regular Expression Extractor to thread Group with following values: • Reference Name: product • Regular Expression: product_id=(\w*-\w*-\w*) • Template: $1$ • Match No.: 0 (Setting this parameter to 0 returns a random match) • Copy the HTTP Request we created in the previous question and paste to the thread group after the previous HTTP Request • Change the following values: • Path: /estore/control/product • Add Parameter and set name to product_id, value to ${product} • Save Test Plan • Run > Start When you view the results in the View Results Tree, you can see the ${product} value was replaced with the value extracted by the regular expression.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123