0

enter image description here

In this example request 226 is main Post request which internally executes 1 Post and 2 Get requests during run time. how i can extract dynamic code value from one of Get request of 226 which is input for the request 228.

I know how to extract from response using RegEx and Xpath. I this case need help Passing Data From a Request to Another Request

Saagar
  • 794
  • 3
  • 20
  • 41

4 Answers4

1

Hopefully you've already found the solution, but I believe that is what you've been looking for: enter image description here

Olha Horak
  • 3,488
  • 2
  • 16
  • 17
0

To extract data from a response, you can go for Regular Expression Extractor in this case which is faster and consumes less memory and CPU compared to other extractors like XPath which is worse.

This blog has decent info on extracting information using Regular Expression Extractor.

You are already saying that you know how to use them. Then it is very easy to pass the value to another request. You just use the variable using below syntax to access the value - ${variablename}. Whereever you need to substitute the value, just use ${variablename}.

Ex: code=${code}&stats=${stats}

Remember: Scope of this variable is within the thread for a thread group.

vins
  • 15,030
  • 3
  • 36
  • 47
  • @vins- Thanks for reply.I need to extract value from request . I this case code value from Get request url. Wanted to know how to extract value from GET/POST request using RegEx. – Saagar Apr 24 '16 at 15:48
  • The value you see in the request should have come in the previous HTTP response. You need to use regex to get them. – vins Apr 24 '16 at 17:10
  • The code value is no where is displaying in previous HTTP responses. Its get generated while executing POST request 226 in runtime. – Saagar Apr 25 '16 at 04:24
0

I don't think you will be able to bypass OAuth 2.0 login challenge using correlation. See How to Run Performance Tests on OAuth Secured Apps with JMeter for feasible options.

Dmitri T
  • 159,985
  • 5
  • 83
  • 133
  • We are using 10duke for our application. Finding difficult to apply the steps given in above forum.. – Saagar Apr 25 '16 at 10:16
0

you can use beanshell sampler to process the results and have prev to get the list of results

org.apache.jmeter.samplers.SampleResult [] temp=prev.getSubResults(); print(temp[2].getURL())

Vikas Madhusudana
  • 1,482
  • 1
  • 10
  • 20