I have problem, or really don't know how to use jmeter. I have such plan:
- Mail reader sampler
|-BeanShell Assertion
- Http Request
In BeanShell Assertion I'm reading mail and doing regexp on it. The script:
import org.apache.jmeter.samplers.SampleResult;
SampleResult[] results = Response.getSubResults();
vars.put("EMAIL_RESPONSE",results[0].getResponseDataAsString());
//print(vars.get("EMAIL_RESPONSE")+"===========");
${__regexFunction(<A HREF=".*uid=(.*)&token=(.*)" CLASS="aactivate",$1$
$2$,1,,NO_LINK,ACT_LINK,EMAIL_RESPONSE)};
The ACT_LINK variables then are used in HTTP request, but there are no
variables(instead of value is used ACT_LING_g1 and ACT_LINK_g2). I really
don't know why. I'm sure that there is no error in regex function, because
if I try to find (.*) then also doesn't work. I was trying to use timer etc.
What strange, when I used such plan:
- Mail reader sampler
|-BeanShell Assertion 1
|-BeanShell Assertion 2
- Http Request
where both assertion have the same script then it begins to work(but also
with problems).
Thanks
--
View this message in context:
http://www.nabble.com/Problem-with-regex-in-beanShell-and-then-using-results-tp24566983p24566983.html
Sent from the JMeter - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]