0
votes

I have a json response from my server which is "url":"http://abc.company.com/abc-payment-ui/985ed46a-416d-4653-b63d-abaee55563d5". I want to extract the only the last part of the url i.e. after "abc-payment-ui/985ed46a-416d-4653-b63d-abaee55563d5" which is the ID i want to use in a request. Any suggestions guys? I know there is a json path extractor for this but that returns me the whole url.

1

1 Answers

0
votes

Did you consider using a regex extractor? It should work very nicely. In your case you should consider something like "abc-payment-ui/(.*)" or something like it.

See some basic guidance here: http://blazemeter.com/blog/using-regular-expressions-jmeter http://jmeter.apache.org/usermanual/regular_expressions.html

If you want to read about JSONPath or XPath, this is an excellent article: http://blazemeter.com/blog/using-xpath-extractor-jmeter-0