You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by atmohsin <at...@gmail.com> on 2008/06/25 12:34:58 UTC

Jmeter with dwr ajax calls

Hi,
    I have recoreded the scinarion for in Jmeter for the application which
has ajax dwr calls. when i ran the scripts i am not getting the expected
result as i get from the manual testing. i did the following set up

In the engine.js HTTP Request, attach two Regular Expresion Post Processor
with:

Reference Name: HTTPSESSIONID 
Regular Expression: DWREngine._httpSessionId = “(.*)”; 
Template: $1$ 
Reference Name: SCRIPTSESSIONID 
Regular Expression: DWREngine._scriptSessionId = “(.*)”; 
Template: $1$ 

but then also getting the same result.

Here is the request and response

Here is the dwr request from Jmeter

	callCount=${input}
page=/scimitar-1.0/mappingScreenControls.htm?scrName=&defineScreenType=Choose+Type...&descScreen=&scrId=&scrTypeId=&depIds=&hdnParent=&chkMarkInActive=on&chkDeleteTestRun=on&screenId=292
httpSessionId=${JSESSIONID} scriptSessionId=${SCRIPTSESSIONID}
c0-scriptName=testCaseManager c0-methodName=saveSreenElementDetails c0-id=0
c0-param0=string:%3Csavescreenelement%3E%3Ccontrol%3E%3CactionPerformed%3E2%3C%2FactionPerformed%3E%3CcontrolId%3E392%3C%2FcontrolId%3E%3ClogicalName%3Etesting%20updatededtesting%3C%2FlogicalName%3E%3CactualName%3E%5B%5D%5B%5D%3C%2FactualName%3E%3CcontrolTypeId%3E1%3C%2FcontrolTypeId%3E%3CdefaultAction%3E1%3C%2FdefaultAction%3E%3Cdescription%3E-%3C%2Fdescription%3E%3CscreenId%3E292%3C%2FscreenId%3E%3C%2Fcontrol%3E%3C%2Fsavescreenelement%3E
c0-param1=number:67 batchId=0


When I ran the Jmeter test

 Here is the result from the report
	Request goes 
		POST data:
callCount=1
page=/scimitar-1.0/mappingScreenControls.htm?scrName=&defineScreenType=Choose+Type...&descScreen=&scrId=&scrTypeId=&depIds=&hdnParent=&chkMarkInActive=on&chkDeleteTestRun=on&screenId=292
httpSessionId=679B526882E4DC37EBDC35A985FA9CA1
scriptSessionId=EA27950ADDDA339813098C7328CC052A
c0-scriptName=testCaseManager c0-methodName=saveSreenElementDetails c0-id=0
c0-param0=string:%3Csavescreenelement%3E%3Ccontrol%3E%3CactionPerformed%3E2%3C%2FactionPerformed%3E%3CcontrolId%3E392%3C%2FcontrolId%3E%3ClogicalName%3Etesting%20updatededtesting%3C%2FlogicalName%3E%3CactualName%3E%5B%5D%5B%5D%3C%2FactualName%3E%3CcontrolTypeId%3E1%3C%2FcontrolTypeId%3E%3CdefaultAction%3E1%3C%2FdefaultAction%3E%3Cdescription%3E-%3C%2Fdescription%3E%3CscreenId%3E292%3C%2FscreenId%3E%3C%2Fcontrol%3E%3C%2Fsavescreenelement%3E
c0-param1=number:67 batchId=0

Response
	//#DWR-REPLY
if (window.dwr) dwr.engine._remoteHandleBatchException({
name:'org.directwebremoting.extend.ServerException', message:'The specified
call count is not a number: 1
page=/scimitar-1.0/mappingScreenControls.htm?scrName=' });
else if (window.parent.dwr)
window.parent.dwr.engine._remoteHandleBatchException({
name:'org.directwebremoting.extend.ServerException', message:'The specified
call count is not a number: 1
page=/scimitar-1.0/mappingScreenControls.htm?scrName=' });

  


Some exeption in the response of the dwr.


If any one have infor pls let me know

Mohsin

-- 
View this message in context: http://www.nabble.com/Jmeter-with-dwr-ajax-calls-tp18109320p18109320.html
Sent from the JMeter - Dev mailing list archive at Nabble.com.


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


Re: Jmeter with dwr ajax calls

Posted by Pramod_bambore <pr...@yahoo.co.in>.
Some good information on DWR and Jmeter is provided at
http://jmetertips.blogspot.com.
It may be a help for some one in the forum.

-- 
View this message in context: http://www.nabble.com/Jmeter-with-dwr-ajax-calls-tp18109320p23033460.html
Sent from the JMeter - Dev mailing list archive at Nabble.com.


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


Re: Jmeter with dwr ajax calls

Posted by shri hulisandra <sh...@yahoo.com>.
We too had this problem... setting the content type to text/plain also did
not help.

Here is what we found :

# "callCount" basically represents the no. of DWR function calls the client
is requesting.

# this info is required by DWR so, it can construct a list of calls and
execute them one after the other.

# dwr gets the inputstream on the request and reads each lines.. it expects
to get parameters and their values like "callCount=1",
"scriptName=DiscountCalculator", "methodName=calculateDiscount",
"httpSessioId=FH65865GHFG" etc.  each time it reads a line (a
parameter=value pair).

# in our case the whole string went in as one line
"callCount=1scriptName=DiscountCalculatormethodName=calculateDiscounthttpSessioId=FH65865GHFG"....

# so, dwr thought that the value for parameter "callCount" was
"1scriptName=DiscountCalculatormethodName=calculateDiscounthttpSessioId=FH65865GHFG"...
which obviously, is not a number. so this exception.

#  The other thing that one can do is, add a "&" between "parameter=value"
pairs. dwr understands that as well and will work fine. like
"callCount=1&scriptName=DiscountCalculator&methodName=calculateDiscount&httpSessioId=FH65865GHFG"

Hope understanding this will help you resolve the problem you are facing.
-- 
View this message in context: http://www.nabble.com/Jmeter-with-dwr-ajax-calls-tp18109320p22571582.html
Sent from the JMeter - Dev mailing list archive at Nabble.com.


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


Re: Jmeter with dwr ajax calls

Posted by sebb <se...@gmail.com>.
This is a question for the JMeter user list, not the developer list.

Please repost to the user list, and give a few more details of what
you have tried, what you expected to happen, and what actually
happened. Also which version of JMeter you are using.

Otherwise it's impossible to give any specific advice.

On 14/11/2008, Pedro Solorzano <pe...@bitahead.com> wrote:
>
>  Hi Atmoshin:
>
>  Did you have any luck solving this issue? Any tip about it? I have the same
>  problem and I am not able to find an answer...
>
>  Thanks in advance for any help!
>
>
>
>  atmohsin wrote:
>  >
>  > Hi,
>  >     I have recoreded the scinarion for in Jmeter for the application which
>  > has ajax dwr calls. when i ran the scripts i am not getting the expected
>  > result as i get from the manual testing. i did the following set up
>  >
>  > In the engine.js HTTP Request, attach two Regular Expresion Post Processor
>  > with:
>  >
>  > Reference Name: HTTPSESSIONID
>  > Regular Expression: DWREngine._httpSessionId = "(.*)";
>  > Template: $1$
>  > Reference Name: SCRIPTSESSIONID
>  > Regular Expression: DWREngine._scriptSessionId = "(.*)";
>  > Template: $1$
>  >
>  > but then also getting the same result.
>  >
>  > Here is the request and response
>  >
>  > Here is the dwr request from Jmeter
>  >
>  >       callCount=${input}
>  > page=/scimitar-1.0/mappingScreenControls.htm?scrName=&defineScreenType=Choose+Type...&descScreen=&scrId=&scrTypeId=&depIds=&hdnParent=&chkMarkInActive=on&chkDeleteTestRun=on&screenId=292
>  > httpSessionId=${JSESSIONID} scriptSessionId=${SCRIPTSESSIONID}
>  > c0-scriptName=testCaseManager c0-methodName=saveSreenElementDetails
>  > c0-id=0
>  > c0-param0=string:%3Csavescreenelement%3E%3Ccontrol%3E%3CactionPerformed%3E2%3C%2FactionPerformed%3E%3CcontrolId%3E392%3C%2FcontrolId%3E%3ClogicalName%3Etesting%20updatededtesting%3C%2FlogicalName%3E%3CactualName%3E%5B%5D%5B%5D%3C%2FactualName%3E%3CcontrolTypeId%3E1%3C%2FcontrolTypeId%3E%3CdefaultAction%3E1%3C%2FdefaultAction%3E%3Cdescription%3E-%3C%2Fdescription%3E%3CscreenId%3E292%3C%2FscreenId%3E%3C%2Fcontrol%3E%3C%2Fsavescreenelement%3E
>  > c0-param1=number:67 batchId=0
>  >
>  >
>  > When I ran the Jmeter test
>  >
>  >  Here is the result from the report
>  >       Request goes
>  >               POST data:
>  > callCount=1
>  > page=/scimitar-1.0/mappingScreenControls.htm?scrName=&defineScreenType=Choose+Type...&descScreen=&scrId=&scrTypeId=&depIds=&hdnParent=&chkMarkInActive=on&chkDeleteTestRun=on&screenId=292
>  > httpSessionId=679B526882E4DC37EBDC35A985FA9CA1
>  > scriptSessionId=EA27950ADDDA339813098C7328CC052A
>  > c0-scriptName=testCaseManager c0-methodName=saveSreenElementDetails
>  > c0-id=0
>  > c0-param0=string:%3Csavescreenelement%3E%3Ccontrol%3E%3CactionPerformed%3E2%3C%2FactionPerformed%3E%3CcontrolId%3E392%3C%2FcontrolId%3E%3ClogicalName%3Etesting%20updatededtesting%3C%2FlogicalName%3E%3CactualName%3E%5B%5D%5B%5D%3C%2FactualName%3E%3CcontrolTypeId%3E1%3C%2FcontrolTypeId%3E%3CdefaultAction%3E1%3C%2FdefaultAction%3E%3Cdescription%3E-%3C%2Fdescription%3E%3CscreenId%3E292%3C%2FscreenId%3E%3C%2Fcontrol%3E%3C%2Fsavescreenelement%3E
>  > c0-param1=number:67 batchId=0
>  >
>  > Response
>  >       //#DWR-REPLY
>  > if (window.dwr) dwr.engine._remoteHandleBatchException({
>  > name:'org.directwebremoting.extend.ServerException', message:'The
>  > specified call count is not a number: 1
>  > page=/scimitar-1.0/mappingScreenControls.htm?scrName=' });
>  > else if (window.parent.dwr)
>  > window.parent.dwr.engine._remoteHandleBatchException({
>  > name:'org.directwebremoting.extend.ServerException', message:'The
>  > specified call count is not a number: 1
>  > page=/scimitar-1.0/mappingScreenControls.htm?scrName=' });
>  >
>  >
>  >
>  >
>  > Some exeption in the response of the dwr.
>  >
>  >
>  > If any one have infor pls let me know
>  >
>  > Mohsin
>  >
>  >
>
>  --
>
> View this message in context: http://www.nabble.com/Jmeter-with-dwr-ajax-calls-tp18109320p20504845.html
>
> Sent from the JMeter - Dev mailing list archive at Nabble.com.
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
>  For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
>
>

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


Re: Jmeter with dwr ajax calls

Posted by Pedro Solorzano <pe...@bitahead.com>.
Hi Atmoshin:

Did you have any luck solving this issue? Any tip about it? I have the same
problem and I am not able to find an answer...

Thanks in advance for any help!


atmohsin wrote:
> 
> Hi,
>     I have recoreded the scinarion for in Jmeter for the application which
> has ajax dwr calls. when i ran the scripts i am not getting the expected
> result as i get from the manual testing. i did the following set up
> 
> In the engine.js HTTP Request, attach two Regular Expresion Post Processor
> with:
> 
> Reference Name: HTTPSESSIONID 
> Regular Expression: DWREngine._httpSessionId = “(.*)”; 
> Template: $1$ 
> Reference Name: SCRIPTSESSIONID 
> Regular Expression: DWREngine._scriptSessionId = “(.*)”; 
> Template: $1$ 
> 
> but then also getting the same result.
> 
> Here is the request and response
> 
> Here is the dwr request from Jmeter
> 
> 	callCount=${input}
> page=/scimitar-1.0/mappingScreenControls.htm?scrName=&defineScreenType=Choose+Type...&descScreen=&scrId=&scrTypeId=&depIds=&hdnParent=&chkMarkInActive=on&chkDeleteTestRun=on&screenId=292
> httpSessionId=${JSESSIONID} scriptSessionId=${SCRIPTSESSIONID}
> c0-scriptName=testCaseManager c0-methodName=saveSreenElementDetails
> c0-id=0
> c0-param0=string:%3Csavescreenelement%3E%3Ccontrol%3E%3CactionPerformed%3E2%3C%2FactionPerformed%3E%3CcontrolId%3E392%3C%2FcontrolId%3E%3ClogicalName%3Etesting%20updatededtesting%3C%2FlogicalName%3E%3CactualName%3E%5B%5D%5B%5D%3C%2FactualName%3E%3CcontrolTypeId%3E1%3C%2FcontrolTypeId%3E%3CdefaultAction%3E1%3C%2FdefaultAction%3E%3Cdescription%3E-%3C%2Fdescription%3E%3CscreenId%3E292%3C%2FscreenId%3E%3C%2Fcontrol%3E%3C%2Fsavescreenelement%3E
> c0-param1=number:67 batchId=0
> 
> 
> When I ran the Jmeter test
> 
>  Here is the result from the report
> 	Request goes 
> 		POST data:
> callCount=1
> page=/scimitar-1.0/mappingScreenControls.htm?scrName=&defineScreenType=Choose+Type...&descScreen=&scrId=&scrTypeId=&depIds=&hdnParent=&chkMarkInActive=on&chkDeleteTestRun=on&screenId=292
> httpSessionId=679B526882E4DC37EBDC35A985FA9CA1
> scriptSessionId=EA27950ADDDA339813098C7328CC052A
> c0-scriptName=testCaseManager c0-methodName=saveSreenElementDetails
> c0-id=0
> c0-param0=string:%3Csavescreenelement%3E%3Ccontrol%3E%3CactionPerformed%3E2%3C%2FactionPerformed%3E%3CcontrolId%3E392%3C%2FcontrolId%3E%3ClogicalName%3Etesting%20updatededtesting%3C%2FlogicalName%3E%3CactualName%3E%5B%5D%5B%5D%3C%2FactualName%3E%3CcontrolTypeId%3E1%3C%2FcontrolTypeId%3E%3CdefaultAction%3E1%3C%2FdefaultAction%3E%3Cdescription%3E-%3C%2Fdescription%3E%3CscreenId%3E292%3C%2FscreenId%3E%3C%2Fcontrol%3E%3C%2Fsavescreenelement%3E
> c0-param1=number:67 batchId=0
> 
> Response
> 	//#DWR-REPLY
> if (window.dwr) dwr.engine._remoteHandleBatchException({
> name:'org.directwebremoting.extend.ServerException', message:'The
> specified call count is not a number: 1
> page=/scimitar-1.0/mappingScreenControls.htm?scrName=' });
> else if (window.parent.dwr)
> window.parent.dwr.engine._remoteHandleBatchException({
> name:'org.directwebremoting.extend.ServerException', message:'The
> specified call count is not a number: 1
> page=/scimitar-1.0/mappingScreenControls.htm?scrName=' });
> 
>   
> 
> 
> Some exeption in the response of the dwr.
> 
> 
> If any one have infor pls let me know
> 
> Mohsin
> 
> 

-- 
View this message in context: http://www.nabble.com/Jmeter-with-dwr-ajax-calls-tp18109320p20504845.html
Sent from the JMeter - Dev mailing list archive at Nabble.com.


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


Re: Jmeter with dwr ajax calls

Posted by Pedro Solorzano <pe...@bitahead.com>.
Hi Again:

I find an article that helped me solve the issue:

http://blogs.reucon.com/srt/2008/01/24/the_specified_call_count_is_not_a_number_null.html

It is not about JMeter but cleverly states that the difference between a
successful request and a failed by "count null" one is the content-type of
the request. I just had to force the content-type of the JMeter request to
"text/plain" and it worked perfectly. To force the content-type in JMeter
you have to add an HTTP-Header-Manager to the HTTP-request-sampler and add
the "Content-Type" header with the "text/plain" value.

Hope it helps.


atmohsin wrote:
> 
> Hi,
>     I have recoreded the scinarion for in Jmeter for the application which
> has ajax dwr calls. when i ran the scripts i am not getting the expected
> result as i get from the manual testing. i did the following set up
> 
> In the engine.js HTTP Request, attach two Regular Expresion Post Processor
> with:
> 
> Reference Name: HTTPSESSIONID 
> Regular Expression: DWREngine._httpSessionId = “(.*)”; 
> Template: $1$ 
> Reference Name: SCRIPTSESSIONID 
> Regular Expression: DWREngine._scriptSessionId = “(.*)”; 
> Template: $1$ 
> 
> but then also getting the same result.
> 
> Here is the request and response
> 
> Here is the dwr request from Jmeter
> 
> 	callCount=${input}
> page=/scimitar-1.0/mappingScreenControls.htm?scrName=&defineScreenType=Choose+Type...&descScreen=&scrId=&scrTypeId=&depIds=&hdnParent=&chkMarkInActive=on&chkDeleteTestRun=on&screenId=292
> httpSessionId=${JSESSIONID} scriptSessionId=${SCRIPTSESSIONID}
> c0-scriptName=testCaseManager c0-methodName=saveSreenElementDetails
> c0-id=0
> c0-param0=string:%3Csavescreenelement%3E%3Ccontrol%3E%3CactionPerformed%3E2%3C%2FactionPerformed%3E%3CcontrolId%3E392%3C%2FcontrolId%3E%3ClogicalName%3Etesting%20updatededtesting%3C%2FlogicalName%3E%3CactualName%3E%5B%5D%5B%5D%3C%2FactualName%3E%3CcontrolTypeId%3E1%3C%2FcontrolTypeId%3E%3CdefaultAction%3E1%3C%2FdefaultAction%3E%3Cdescription%3E-%3C%2Fdescription%3E%3CscreenId%3E292%3C%2FscreenId%3E%3C%2Fcontrol%3E%3C%2Fsavescreenelement%3E
> c0-param1=number:67 batchId=0
> 
> 
> When I ran the Jmeter test
> 
>  Here is the result from the report
> 	Request goes 
> 		POST data:
> callCount=1
> page=/scimitar-1.0/mappingScreenControls.htm?scrName=&defineScreenType=Choose+Type...&descScreen=&scrId=&scrTypeId=&depIds=&hdnParent=&chkMarkInActive=on&chkDeleteTestRun=on&screenId=292
> httpSessionId=679B526882E4DC37EBDC35A985FA9CA1
> scriptSessionId=EA27950ADDDA339813098C7328CC052A
> c0-scriptName=testCaseManager c0-methodName=saveSreenElementDetails
> c0-id=0
> c0-param0=string:%3Csavescreenelement%3E%3Ccontrol%3E%3CactionPerformed%3E2%3C%2FactionPerformed%3E%3CcontrolId%3E392%3C%2FcontrolId%3E%3ClogicalName%3Etesting%20updatededtesting%3C%2FlogicalName%3E%3CactualName%3E%5B%5D%5B%5D%3C%2FactualName%3E%3CcontrolTypeId%3E1%3C%2FcontrolTypeId%3E%3CdefaultAction%3E1%3C%2FdefaultAction%3E%3Cdescription%3E-%3C%2Fdescription%3E%3CscreenId%3E292%3C%2FscreenId%3E%3C%2Fcontrol%3E%3C%2Fsavescreenelement%3E
> c0-param1=number:67 batchId=0
> 
> Response
> 	//#DWR-REPLY
> if (window.dwr) dwr.engine._remoteHandleBatchException({
> name:'org.directwebremoting.extend.ServerException', message:'The
> specified call count is not a number: 1
> page=/scimitar-1.0/mappingScreenControls.htm?scrName=' });
> else if (window.parent.dwr)
> window.parent.dwr.engine._remoteHandleBatchException({
> name:'org.directwebremoting.extend.ServerException', message:'The
> specified call count is not a number: 1
> page=/scimitar-1.0/mappingScreenControls.htm?scrName=' });
> 
>   
> 
> 
> Some exeption in the response of the dwr.
> 
> 
> If any one have infor pls let me know
> 
> Mohsin
> 
> 

-- 
View this message in context: http://www.nabble.com/Jmeter-with-dwr-ajax-calls-tp18109320p20507413.html
Sent from the JMeter - Dev mailing list archive at Nabble.com.


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