Sebb,
Thanks for your answer.
I don't know how (where) to put \s in my assertion : if I place \s at the
beginning of the assertion and another \s at the end of it, Jmeter consider
these terms as member of the string to compare ; if i write (?s) and (?-s) -
as it was written in the help of Jmeter, the assertion fails too ...


-----Message d'origine-----
De : sebb [mailto:[EMAIL PROTECTED] 
Envoyé : vendredi 7 octobre 2005 15:57
À : JMeter Users List
Objet : Re: JMeter refuse my response assertion ...

If it is an HTML page, then spacing is irrelevant.
Do you want the test to fail if the spacing changes?

I suggest you use

    \s+
or
    \s*

between the bits of text you want to match.

Alternatively, do a basic check on the page at run-time, and use the
SaveResponses Post-Processor to create a file with the exact response, and
compare that later.

S
On 07/10/05, Bruno CHARLOUP <[EMAIL PROTECTED]> wrote:
> Hi Noam,
> I've proceed as you indicate :
> In the file recorded by the post processor on my page, I have the 
> following data (I saw LF and CR thanks to another editor, I put them 
> in the following text between '<' and '>' tags) :
> var criteria = new Array();<LF>
> <CR>
> criteria['R0003'] = ["Tous Champs", "Titre", "Auteur", "Sujet", 
> "ISBN"];<CR> criteria['R0001'] = ["Tous Champs", "Titre", "Auteur", 
> "Sujet", "ISBN"];<CR> criteria['R0002'] = ["Tous Champs", "Titre", 
> "Auteur", "Sujet", "ISBN"];<CR> criteria['R0004'] = ["Tous Champs", 
> "Titre", "Auteur", "Sujet", "ISBN"];<LF>
>
> In the tree result listener the script is different, concerning end of 
> lines
> :
> var criteria = new Array();<CR><LF>
> <CR><LF>
> criteria['R0003'] = ["Tous Champs", "Titre", "Auteur", "Sujet", 
> "ISBN"];<CR><LF> criteria['R0001'] = ["Tous Champs", "Titre", 
> "Auteur", "Sujet", "ISBN"];<CR><LF> criteria['R0002'] = ["Tous 
> Champs", "Titre", "Auteur", "Sujet", "ISBN"];<CR><LF> 
> criteria['R0004'] = ["Tous Champs", "Titre", "Auteur", "Sujet", 
> "ISBN"];<CR><LF>
>
> I suppose this difference of encoding of new line is the reason of the 
> failure of my assertion.
> I work with the code from this listener to create assertion (after 
> escaping special caracter) : this means that my process is probably 
> not correct to perform such a test ?
>
> Do you have a solution or a suggestion ?
>
> Thanks in advance.
>
> Bruno.
>
>
> -----Message d'origine-----
> De : Noam Paz [mailto:[EMAIL PROTECTED] Envoyé : vendredi 7 octobre 
> 2005 14:51 À : JMeter Users List Objet : RE: JMeter refuse my response 
> assertion ...
>
>
>
>
>
>
> Hi Bruno,
> if you use the post-processor "Save Responses to a file" and make a 
> diff between what you actually get and what you expect (your regexp 
> pattern), what is the result?
>
> Best regards / Viele Grüße
>
> Noam Paz
>
>
>
>
>
>
>
>             "Bruno CHARLOUP" <[EMAIL PROTECTED]>
>
>
>
>             07.10.2005 14:43
> To
>
> "'JMeter Users List'" <[email protected]>, "'sebb'"
> <[EMAIL PROTECTED]>
>
>
> cc
>
> Please respond to
>
>
> "JMeter Users List" <[email protected]> Subject
>
> RE: JMeter refuse my response assertion ...
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> Hi Sebb,
> Exact !
> If i cut each line of this expression in several pattern, it works but 
> in other part of my page (and in other page), new lines are not a problem
...
> My question is why is this part of my page, these lines are a problem 
> ... It is a mystery for me.
>
> My purpose is to use Jmeter for non regression test, and I put in a 
> assertion, for each page of my test plan, the whole of the code of the 
> page, and it works for most of pages, not for this one ...
>
>
> -----Message d'origine-----
> De : sebb [mailto:[EMAIL PROTECTED]
> Envoyé : vendredi 7 octobre 2005 14:32 À : JMeter Users List Objet : 
> Re: JMeter refuse my response assertion ...
>
> On 07/10/05, Bruno CHARLOUP <[EMAIL PROTECTED]> wrote:
> > Hi all,
> > I've put the following part of script in a response assertion.
> >
> > var criteria = new Array\(\);
> >
> > criteria\['R0003'\] = \["Tous Champs", "Titre", "Auteur", "Sujet", 
> > "ISBN"\]; criteria\['R0001'\] = \["Tous Champs", "Titre", "Auteur", 
> > "Sujet", "ISBN"\]; criteria\['R0002'\] = \["Tous Champs", "Titre", 
> > "Auteur", "Sujet", "ISBN"\]; criteria\['R0004'\] = \["Tous Champs", 
> > "Titre", "Auteur", "Sujet", "ISBN"\];
> >
> >
> > Even if my tested page contains this script, I've always the 
> > following error
> > :
> >
> > Test failed, text expected to contain /var criteria = new Array\(\);
> >
>
> This indicates that the expression was valid, but not found. This is 
> probably because of the new lines.
>
> You might do better to code the lines as separate patterns on the 
> assertion page.
>
> S.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
> --
>
> Diese E-Mail enthaelt vertrauliche und/oder rechtlich geschuetzte 
> Informationen. Wenn Sie nicht der richtige Adressat sind oder diese 
> E-Mail irrtuemlich erhalten haben, informieren Sie bitte sofort den 
> Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie 
> die unbefugte Weitergabe dieser Mail ist nicht gestattet.
>
> This e-mail may contain confidential and/or privileged information. If 
> you are not the intended recipient (or have received this e-mail in 
> error) please notify the sender immediately and destroy this e-mail. 
> Any unauthorized copying, disclosure or distribution of the material 
> in this e-mail is strictly forbidden.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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



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

Reply via email to