Thanks. no problem.
I've found my mistake. Probably I can't use jmeter function in beanshell.


Ok I see your problem but
I never used {__regexFunction.  I'm sorry but I can't help you on this kind
of  function problem

In my project, I used a lot of regular expression, but
I coded directly  in java code to execute them (see java.util.regex)

1- I write a java code with a return value by using a "BeanShell
Sampler"(script field).
2- I executed it 
3- Display the result in a "View result tree" result.

perhaps it will help you

annie35




irtoip wrote:
> 
> Yes, I'm sure the response is correct, because I printed it.
> Even if I call function with such expresion:
> 
> ${__regexFunction((.*),$1$,1,,NO_LINK,ACT_LINK,EMAIL_RESPONSE)}; 
> 
> there is no results.
> 
> 
> annie35 wrote:
>> 
>> Hi,
>> 
>> Your response is Correct ?
>> If it is ok the you can test your regular expression on your response
>> data with this web site http://www.spaweditor.com/scripts/regex/index.php
>> 
>> It is a free site. It enables to test regular expression on every data
>> then find what you want.
>> 
>> good luck
>> annie35
>> 
>> 
>> 
>> 
>> irtoip wrote:
>>> 
>>> 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( .*uid=(.*)&token=(.*) 
>>> 
>>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Problem-with-regex-in-beanShell-and-then-using-results-tp24566983p24620248.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]

Reply via email to