0

I have to do performance testing for ipad application. There is scenario in which i have to read the token id from the response and use this token id in my next request. I used the regular expression extractor, but when i used the variable in next request i.e. ${tokenid}, it wasn't replaced with the captured value. When i look at View Result tree, it is simply requesting the variable instead of token. Here is the regular expression extractor

2
  • I didn't working out for me. Here is request which is hitting to server. POST data: {"Token":"${tokenid}"} The "tokenid" is not replacing by the actual value Commented Feb 1, 2013 at 5:58
  • Please show the test plan screenshot, at least previous sampler and children and the one with var, also show response that contains token Commented Feb 1, 2013 at 6:49

1 Answer 1

0

There is at least an error where you must check:

  • Body

instead of checking :

  • Response Code

in Regular Expression Extractor

You can use View Result to check your regexp:

enter image description here

Finally regexp should be:

"Token":"([^"]+?)" 
Sign up to request clarification or add additional context in comments.

2 Comments

I tried selecting the 'Body', even other options also. but it didn't work. Is there any way to verify that regular expression extractor is reading the Token or not. This is my token id: {"Token":"e4378e76-3085-4ef3-a223-7b8a30283a0e"}
Your problem is that you checked "Respoonse Code" in Regular Expression Extractor , you must check Body .

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.