jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Deepak Goel <deic...@gmail.com>
Subject Re: different user get same response data
Date Tue, 04 Dec 2012 13:25:15 GMT
Might be a bug, lowest common denominator in printing if the response
time is same (user1, user2)

On 12/4/12, sebb <sebbaz@gmail.com> wrote:
> On 4 December 2012 06:01, frank <hwl@windowslive.com> wrote:
>> i need to do the assertion after collecting some response data of
>> requests,
>> e.g.
>> there are 2 request - request1 and request2, then i need to collect the
>> response data of request1 and request2, then do the assertion on request2
>> (
>> add beanshell assertion under request2 ).
>>
>> my test plan looks like next :
>>
>> Test Plan
>>   |_Http Cookie Manager
>>   |_CSV Data Set
>>   |_threadgroup
>>          |_request1
>>               |_beanshell postprocessor
>>          |_request2
>>               |_beanshell post processor
>>               |_beanshell assertion
>>
>> i set the number of threads is 5 in thread group.
>>
>> wherein the 'Http Cookie Manager' use default setting, the 'Cookie
>> Policy'
>> is compatibility.
>>
>> the 'beanshell post processor' is used for collecting response data, the
>> following is its script :
>>
>> String tmp = "";if( props.get("GRD")==null) { tmp =
>> prev.getResponseDataAsString();}else {tmp = props.get("GRD") +
>> prev.getResponseDataAsString();}props.put("GRD",tmp);
>>
>> and next is beanshell assertion script :
>>
>> String responseData = props.get("GRD");
>> responseData = "<root>"+responseData+"</root>";
>> log.warn("response data : "+responseData);
>> if(!responseData.contains("...")){Failure=true; FailureMessage=".....";}
>>
>> props.put("GRD","");
>>
>> but sometimes, i found that - log.warn("response data : "+responseData),
>> would print out same response data for different user in jmeter.log, take
>> 5
>> users( threads ) for example, e.g.
>>
>> response data1 : <user1> data
>> response data2 : <user1> data
>> response data3 :
>> response data4 : <user4> data
>> response data5 : <user5> data
>>
>> response data2 should be 'user2' data, but now it's user1 data.  but in
>> 'Response data' tab of jmeter gui, it's user2 data.
>>
>> i checked the application log, and found that next log info :
>>
>> 15:51:30.613 : <user1> data
>> 15:51:30.614 : <user2> data
>>
>> the response time of user1 and user2 are very close, the difference is 1
>> millisecond,
>> so is this results in 'user2' get user1's response data in beanshell post
>> processor?
>
> No, that cannot happen.
>
> I suspect you misunderstand how CSV DataSet works.
> It does not hand out values in strict thread number order, instead it
> hands them out on request by each thread.
>
>> how to solve this problem?
>
> Add Debug Samplers to show the variables at different points in the test
> plan.
>
>> Thanks in advance!
>>
>>
>>
>> --
>> View this message in context:
>> http://jmeter.512774.n5.nabble.com/different-user-get-same-response-data-tp5715481.html
>> Sent from the JMeter - User mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
>> For additional commands, e-mail: user-help@jmeter.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org
>
>


-- 
Namaskara~Nalama~Guten Tag~Bonjour


   --
Keigu

Deepak
+91-9765089593
deicool@gmail.com
http://www.simtree.net

Skype: thumsupdeicool
Google talk: deicool
Blog: http://loveandfearless.wordpress.com
Facebook: http://www.facebook.com/deicool

"Contribute to the world, environment and more : http://www.gridrepublic.org
"

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


Mime
View raw message