jmeter-user mailing list archives

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

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"))}

FYI

Ori Marko 
Quality Assurance Engineer 
Praxell Inc.
http://www.praxell.com

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

Hi

 

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?

 

Thanks 

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


---------------------------------------------------------------------
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