Hi Rajith, Thanks for the info ,I will try this method as well, In my scenario I have to extract assetID from a JSON array where there are multiple assets in it(Multiple keys with 'id').So I think I have to make few changes to your sample regex to work it with JSON arrays. Had an offline discussion with omindu and he suggest to try this[1] method as well.
Thanks, Kasun [1]: http://stackoverflow.com/questions/28817937/parsing-multiple-values-from-string-in-jmeter-response On Mon, Mar 7, 2016 at 10:40 AM, Rajith Roshan <raji...@wso2.com> wrote: > Hi Kasun, > > I think we can also use "Regular Expression Extractor" get the id of an > asset with the following regular expression. > > "id" : "(.+?)" > > you can save the asset id with reference name and can be used this > reference in future operations. (Eg : Update asset with extracted ID). > > Thanks! > Rajith > > On Sun, Mar 6, 2016 at 5:23 PM, Danesh Kuruppu <dan...@wso2.com> wrote: > >> Hi Kasun, >> >> Can't we use Jmeter post-processors here as [1]. If your response is in >> JSON format, you need to install JSON plugin [2] >> >> 1. http://www.thetestingworld.com/post-processors-in-jmeter/ >> 2. http://jmeter-plugins.org/wiki/JSONPathExtractor/ >> >> Thanks >> Danesh >> >> On Fri, Mar 4, 2016 at 4:43 PM, Kasun Thennakoon <kasu...@wso2.com> >> wrote: >> >>> Hi All, >>> >>> I'm using Jmeter 2.6 for performance testing on Greg. >>> I want to do the $subject in JMeter, to update an asset by assetId as >>> part of CRUD operations. I couldn’t find an element to assign response >>> parameter to a jmeter internal variable. >>> Could some one suggest a method to $subject ? >>> >>> Thanks, >>> -- >>> *Kasun Thennakoon* >>> Software Engineer >>> WSO2, Inc. >>> Mobile:+94 711661919 >>> >> >> >> >> -- >> >> Danesh Kuruppu >> Software Engineer >> WSO2 Inc, >> Mobile: +94 (77) 1690552 >> >> _______________________________________________ >> Dev mailing list >> Dev@wso2.org >> http://wso2.org/cgi-bin/mailman/listinfo/dev >> >> > > > -- > Rajith Roshan > Software Engineer, WSO2 Inc. > Mobile: +94-72-642-8350 <%2B94-71-554-8430> > -- *Kasun Thennakoon* Software Engineer WSO2, Inc. Mobile:+94 711661919
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev