Hi - 

I have run into problems getting JMeter to do text assertions on certain
HTML text. 

I want JMeter response assertions to ensures HTML snippets like the one
below occur in the HTTP response:
--------------------------------------------------------
<input type="hidden" name="NEW_ITEM-DESCRIPTION[1]" value = "Leader ohp
trolley">
--------------------------------------------------------

This requires that things like the quotation mark ('"'), be escaped. JMeter
uses Jakarta-ORO which implements Perl-compatible regular expressions (doco:
http://jakarta.apache.org/oro/index.html). So I figured  using Perl
quotemeta could escape the text properly: 
--------------------------------------------------------
bash$ perl -le 'print quotemeta q/<input type="hidden"
name="NEW_ITEM-DESCRIPTION[1]" value = "Leader ohp trolley">/'
--------------------------------------------------------

That gave me:
--------------------------------------------------------
\<input\ type\=\"hidden\"\ name\=\"NEW_ITEM\-DESCRIPTION\[1\]\"\ value\ \=\
\"Leader\ ohp\ trolley\"\> 
--------------------------------------------------------

This worked to an extent. The problem is that Jakarta-ORO/JMeter does not
like certain things Perl quotemeta does -- like the escaping of spaces ('\
'), or escaping square brackets ('\[1\]'). 

Can anyone let me know a good way to escape the HTML snippets above so that
JMeter can use it in a response assertions? 

With regards,
Sonam Chauhan
-- 
Corporate Express Australia Ltd.
Phone: +61-2-9335-0725, Fax: 9335-0753, Email: [EMAIL PROTECTED]
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to