You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by sebb <se...@gmail.com> on 2009/01/03 12:22:51 UTC

Re: how to "assert" a whole html page with some dynamic content

On 31/12/2008, yaroslav1 <sl...@yahoo.com> wrote:
>
>  Hi,
>
>  First for all - Happy New Year everyboby!
>
>  Here is a problem which I cannot solve a few days... :(
>
>  I'm trying to check a whole html page with some dynamic content.

That is going to be tricky and expensive - is it really necessary to
check everything?

I suggest you just check a few important parts of the page in the test itself.
If you really want to check the full page, use the Save Responses to a
File element to create a file with the full details and compare that
separately after the test has finished.

>  My approach is like:
>  1) make http-request;
>  2) by using regular-expression-extractor to create those variables (related
>  to the dynamic content);
>  3) usu response-assertion (with selected "Text Response" and "Equal"), into
>  "patterns to test" - copy-paste the full page from a response of the step
>  1), and to replace the dynamic content by variables from
>  regular-expression-extractors.
>  But this is does not work as expected.

Probably because of line endings.

If you really want to debug this, then save the HTML to a file, and
create a test plan using an HTTP sampler with the "file" protocol.

You can then re-run the test as often as you want, and gradually
refine the RE to do what you want.

Start with a short section using "Contains" and gradually add more to
the RE. Switch to "Equal" at the very end.

>  I do understand that you shoul not to "debug" my test-plan, but this is the
>  best way to provide details
>  Here is my simple test-plan (I've also attached as a file) - what is wrong?

Please don't send attachments or large includes to the list.

<snip/>

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