Ok, I got this to work using the Regular Expression
Extractor in 1.9 RC1. Now my question is, how
"unstable" is the last unstable build? :-) Is it good
enough to use for some serious testing? And looks like
the same thing doesn't work in 1.8.1. Is that a known
bug?
Thanks,
Sunondo
On Thu, 12 Jun 2003 18:37:35 -0700 (PDT), "Sunondo
Ghosh" wrote:
>
> I have been playing around with JMeter and it looks
> like a very cool tool. Thanks to all the developers
> behind it.
>
> I am using JMeter v 1.8.1 on Windows 2000. I have a
> question about creating a URL based on some data in
the
> previous response. I need to get an answer to this by
> tomorrow otherwise I will need to try some other tool
> or hack our code to do the testing! :-( I went through
> the user manual and some previous questions on the
> jmeter-user mailing list but could not get an answer
to
> this.
>
> I am sending a request which should contain the
> following data in the response:
>
> <a
>
href="contract.terms.ViewTermDetails.do?init=true&contractHandle=$7.3e">OpalBaseForm</a>
>
> I checked in the View Results tree and the response
> indeed contains that. Now I want to extract the value
> $7.3e from this response and use it in the next HTTP
> request as follows:
>
> /opal/contract.terms.ViewTermDetails.do
> with the Parameters
> init=true and
> contractHandle=$7.3e
>
> I created a new HTTP request with
> Path=/opal/contract.terms.ViewTermDetails.do and two
> paramters with the second parameter as follows:
> Name=contractHandle;
>
Value=${__regexFunction(%3Ca+href%3D%22contract.terms.ViewTermDetails.do%3Finit%3Dtrue%26contractHandle%3D%28.*%29%22%3E,%241%24,1,,,contractHandle)}
>
> which is a function created from the regular
expression
> <a
>
href="contract.terms.ViewTermDetails.do?init=true&contractHandle=(.*)">
> Template=$1$
> Match=1
> Name of function=contractHandle
>
> This did not work. Then I tried to insert the regular
> expression function in a response assertion
(suggestion
> in another mail) just following the first request and
> inserted ${contractHandle} in place of the Value for
> the contractHandle parameter. This did not work
either.
> At this point my test plan is:
> | Http Request 1
> -- Response Assertion
> | Http Request 2
>
> Next I inserted an Assertion Results following the
> first request and inserted the same function.
> | Http Request 1
> -- Response Assertion
> -- Assertion Results
> | Http Request 2
>
> The assertion results does not give an error which
> means the regular expression is being matched. Still
> the Http Request 2 goes out as follows:
>
http://.../contract.terms.ViewTermDetails.do?init=true&contractHandle=${contractHandle}
>
> I tried this also. Still doesn't work.
> | Http Request 1
> | Response Assertion
> | Assertion Results
> | Http Request 2
>
> What am I doing wrong? Is there any other way to do
> what I want? I will really appreciate any help.
>
> Thanks,
>
> Sunondo
>
>
---------------------------------------------------------------------
> 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]