Hej Sergio,
Thanks for responding, but I guess I wasn't clear enough, or maybe I'm the one
missing something obvious. Let me try to be extremely specific, by drawing a
simple test plan:
Simple Controller
+- HTTP Request Defaults
+- HTTP Request 1
+- HTTP Request 2
+- HTTP Request 3
+- HTTP Request 4
+- Response Assertion
In the HTTP Request Defaults I set a server name, and port, and a default set
of parameters. Then in HTTP Requests 1-4 I set three additional parameters, for
instance port, protocol, and format, for instance:
HTTP Request 1 sets port=80, protocol=http, format=html
HTTP Request 2 sets port=554, protocol=mms, format=m3u
HTTP Request 3 sets port=80, protocol=mms, format=pls
HTTP Request 4 sets port=80, protocol=rtsp, format=xml
Now, in the Response Assertion I would like to be able to access these values.
If these are available through for instance ${port}, ${protocol} and ${format}
I'm there. But as far as I can see, this is not a feature of JMeter. If I
understand your suggestion correctly, you propose to add a Regular Expression
Post Processor for each HTTP Request, which will first extract these values
from the response, such that these can be accessed in the Response Assertion.
But then I'm comparing output with output instead of input with output which is
what we want to achieve.
Hopefully this makes things clearer.
Sincerely,
Jakob
On 21 mrt. 2013, at 12:25, Sergio Boso <[email protected]> wrote:
> Il 20/03/2013 14:17, Jakob van Bethlehem ha scritto:
>> Dear users,
>>
>> Is there some non-trivial way to access the parameters that were passed in a
>> request in the corresponding Response Assertion. The main idea is to have a
>> set of different HTTP Requests with slightly different parameters, that all
>> have the same response, expect that these parameters are used to fill in
>> some details. Think for instance about passing a port or a protocol that
>> should be used when responding.
>>
>> Sincerely,
>> Jakob van Bethlehem
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
> Hi maybe I'm missing some point,
>
> but I usually achieve that by inserting proper variable the assertion field.
> E.g.., if I know that the page must contain the ${username} value, I just
> put ${username} in the response assertion.
> Often some regular expression i required.
>
> regards
>
>
> --
>
> Ing. Sergio Boso
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]