jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: jmeter: ampersand in extracted url - have searched for 2 hours now... Help?
Date Wed, 02 Aug 2006 23:21:10 GMT
On 21/07/06, Michel Plungjan <mplungjan@gmail.com> wrote:
> Using an http request I extract a  valid xhtml query string
> ?NR=1500002&amp;CC=EP&amp;KC=A1.....
> by running it through a regular expression extractor
> /details/bibliographicData(\?.*)"
> I call it qString
>
> JMeter does not change the &amp; to & before doing the next http request.
>
> I tried
> /bibliographicData${__javaScript('${qString}'.replace(/amp;/g,'')}
> and
> bibliographicData${__javaScript('${qString}'.split('amp;').join('')}
>
> but they do nothing - so I guess I need to set something up to run beanShell

The first one generates an error in jmeter.log.

I did not try the second, but I guess it would also fail due to
missing closing parenthesis.

Try

${__javaScript('${qString}'.replace(/amp;/g\,''))}

i.e. escape the comma, and add the missing closing parenthesis


> /bibliographicData${__BeanShell(fixAmps("${qString}"))}
>
> which I would rather not.
>
> I cannot seem to find how and in what order I could use a the
> extractor to simply replace &amp; with &
>
> Suggestions are VERY welcome. I am so close but so far away :(
>
> Thanks a LOT in advance
>
> Michel
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Mime
View raw message