jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ori Marco" <>
Subject RE: Jmeter+javascript issue
Date Tue, 18 Dec 2007 15:10:37 GMT

Just adding that It works in JavaScript on html and I tried and failed
also to add '' to variable name as follow

Value    ${__javaScript('${Value }'.replace(/^/g, "\^"))}

Value    ${__javaScript('${Value }'.replace(/ /g,"%20"))}


Ori Marko 
Quality Assurance Engineer 
Praxell Inc.

-----Original Message-----
From: Ori Marco [] 
Sent: Tuesday, December 18, 2007 12:28 PM
To: JMeter Users List
Subject: Jmeter+javascript issue



I want to assert http request with variable, but to do so I need to
convert some chars in regular expression value:

 ^,?,+ should be added \ before and space char should be convert to %20

e.g. Http request is: Param1=^ABC&Param2=A%20B%20C

Regular expression value before conversion: Param1=^ABC&Param2=A B C


What is the best way to convert?

I tried to use JavaScript in User parameters component but failed (
didn't replace any chars):

Value    ${__javaScript(${Value }.replace(/^/g, "\^"))}

Value    ${__javaScript(${Value }.replace(/ /g,"%20"))}


What can be done to achieve this conversions?



Ori Marko 
Quality Assurance Engineer 
Praxell Inc.
Mobile: 0524-455-177
Office:03-6126060 Ext 612
Fax: 03-6126066 <> 

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message