You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Troy Harris <tr...@gmail.com> on 2008/11/19 02:26:39 UTC

Clicking jQuery Grid links

Hi,

I'm having a few problems with testing a jQuery Grid link and would
appreciate some direction on where to look next.

Issue is that the jQuery Grid creates the ID in the URL which I need to
navigate to, I can set this statically in Jmeter though
this doesnt really work very well with multiple threads and numerous ID's.

>From what I can see the following occurs

POST
../Questions/GridDataHandler.ashx

POSTDATA=id=grid&ascx=~%2FPortlets%2FQuestionSets.ascx&source=questionsets&page=1&rows=25&sidx=QuestionSetId&sord=asc&_nd=1226990109047&_search=false



Which should give me



RESPONSE



{"page":1,"total":1,"records":4,"rows":[{"id":"36","cell":["<a
href=\"EditQuestionSet.aspx?QuestionSetId=36\">\r\n
    yyy</a>","Nov
17 2008","Nov 17 2008","7","Nov 17 2008"]},{"id":"42","cell":["<a
href=\"EditQuestionSet.aspx?QuestionSetId=42\">\r\n
    other<>~!\"£$%^&*</a>","Nov
17 2008","Nov 17 2008","-","Nov 17 2008"]},{"id":"43","cell":["<a
href=\"EditQuestionSet.aspx?QuestionSetId=43\">\r\n
    new</a>","Nov
17 2008","Nov 17 2008","1","Nov 17 2008"]},{"id":"44","cell":["<a
href=\"EditQuestionSet.aspx?QuestionSetId=44\">\r\n
    Ù?تاÙ"بÛOبÙ"Ú(c)Ù.Ù?تاÙ"</a>","Nov
17 2008","Nov 17 2008","1","Nov 17 2008"]}]}


>From here I should be able to use the regular expression extractor to
navigate to this users QuestionSetID.

I'll also post over on the jGrid forum as I think the next step is trying to
workout how the value for _nd=? is created in the POST to
GridDataHandler.ashx.
If I can find this I should be able to get the RESPONSE required in Jmeter.

jGrid link
http://www.trirand.com/blog/


Any suggestions?

Troy

-- 
NOTICE:
This e-mail message is intended only for the addressee(s) and contains
information which may be confidential If you are not the intended recipient
please advise the sender by return email, do not use or disclose the
contents, and delete the message and any attachments from your system.

Re: Clicking jQuery Grid links

Posted by Troy Harris <tr...@gmail.com>.
Thanks for the reply Sebb.

The POST to GridDataHandler.ashx is the last file called before the page is
populated with the
links I need to click. I used a Firefox app called Tamper Data which allowed
me to see the
file called prior to the links being displayed.

Fo example

I navigate to ../Questions/QuestionSets.aspx
Stylesheet and images load. A javascript "loading" is displayed.
jQuery jGrid then loads which Tamper data shows the last file called is
GridDataHandler.ashx.
If I deny this POST the grid and links dont load. If I allow the POST I can
hover over visible links
which will navigate to say

../Questions/EditQuestionSet.aspx?QuestionSetId=36

The variable  _nd=1226990109047 is nowhere to be found. I tried recording
the whole process with
Jmeter Proxy and Tamper data then searching for _nd and  1226990109047,
neither of these
appear. So Im going with your assumption that its a random number.

I've now created a GridDataHandler.ashx POST with POSTDATA and I receive a
response
though the RESPONSE  Content-Type=application/json; charset=utf-16
UTF-16 is making the response unreadable via Results tree listener and I
assume the
Regex Extractor would also fail.

Any ideas on working with a UTF-16 response?

Troy

--
TD app here
http://tamperdata.mozdev.org/


On Wed, Nov 19, 2008 at 10:40 PM, sebb <se...@gmail.com> wrote:

> On 19/11/2008, Troy Harris <tr...@gmail.com> wrote:
> > Hi,
> >
> >  I'm having a few problems with testing a jQuery Grid link and would
> >  appreciate some direction on where to look next.
> >
> >  Issue is that the jQuery Grid creates the ID in the URL which I need to
> >  navigate to, I can set this statically in Jmeter though
> >  this doesnt really work very well with multiple threads and numerous
> ID's.
>
> Are you sure it sets it in the URL? The example below shows a POST
> with parameters.
>
> >  From what I can see the following occurs
> >
> >  POST
> >  ../Questions/GridDataHandler.ashx
> >
> >
>  POSTDATA=id=grid&ascx=~%2FPortlets%2FQuestionSets.ascx&source=questionsets&page=1&rows=25&sidx=QuestionSetId&sord=asc&_nd=1226990109047&_search=false
> >
>
> Looks like the variable part is
>  _nd=1226990109047
> which can be extracted from the previous page using the Regex
> Extractor Post-Processor.
>
> You might find the HTML Link Parser will work for you (depends on how
> the previous page is constructed). Worth a try, because it is simple
> to add.
>
> Just add all the parameters to the POST sample, and either use .* for
> the _id (Link Parser) or use ${variable_name} (Regex Extractor)
>
> >
> >  Which should give me
> >
> >
> >
> >  RESPONSE
> >
> >
> >
> >  {"page":1,"total":1,"records":4,"rows":[{"id":"36","cell":["<a
> >  href=\"EditQuestionSet.aspx?QuestionSetId=36\">\r\n
> >     yyy</a>","Nov
> >  17 2008","Nov 17 2008","7","Nov 17 2008"]},{"id":"42","cell":["<a
> >  href=\"EditQuestionSet.aspx?QuestionSetId=42\">\r\n
> >     other<>~!\"£$%^&*</a>","Nov
> >  17 2008","Nov 17 2008","-","Nov 17 2008"]},{"id":"43","cell":["<a
> >  href=\"EditQuestionSet.aspx?QuestionSetId=43\">\r\n
> >     new</a>","Nov
> >  17 2008","Nov 17 2008","1","Nov 17 2008"]},{"id":"44","cell":["<a
> >  href=\"EditQuestionSet.aspx?QuestionSetId=44\">\r\n
> >     Ù?تاÙ"بÛOبÙ"Ú(c)Ù.Ù?تاÙ"</a>","Nov
> >  17 2008","Nov 17 2008","1","Nov 17 2008"]}]}
> >
> >
> >  From here I should be able to use the regular expression extractor to
> >  navigate to this users QuestionSetID.
> >
> >  I'll also post over on the jGrid forum as I think the next step is
> trying to
> >  workout how the value for _nd=? is created in the POST to
> >  GridDataHandler.ashx.
> >  If I can find this I should be able to get the RESPONSE required in
> Jmeter.
> >
> >  jGrid link
> >  http://www.trirand.com/blog/
> >
> >
> >  Any suggestions?
> >
> >  Troy
> >
> >
> >  --
> >  NOTICE:
> >  This e-mail message is intended only for the addressee(s) and contains
> >  information which may be confidential If you are not the intended
> recipient
> >  please advise the sender by return email, do not use or disclose the
> >  contents, and delete the message and any attachments from your system.
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>


-- 
NOTICE:
This e-mail message is intended only for the addressee(s) and contains
information which may be confidential.The only monster here is the gambling
monster that has enslaved your mother! I call him Gamblor, and it's time to
snatch your mother from his neon claws! If you are not the intended
recipient please advise the sender by return email, do not use or disclose
the contents, and delete the message and any attachments from your system.

Re: Clicking jQuery Grid links

Posted by sebb <se...@gmail.com>.
On 19/11/2008, Troy Harris <tr...@gmail.com> wrote:
> Hi,
>
>  I'm having a few problems with testing a jQuery Grid link and would
>  appreciate some direction on where to look next.
>
>  Issue is that the jQuery Grid creates the ID in the URL which I need to
>  navigate to, I can set this statically in Jmeter though
>  this doesnt really work very well with multiple threads and numerous ID's.

Are you sure it sets it in the URL? The example below shows a POST
with parameters.

>  From what I can see the following occurs
>
>  POST
>  ../Questions/GridDataHandler.ashx
>
>  POSTDATA=id=grid&ascx=~%2FPortlets%2FQuestionSets.ascx&source=questionsets&page=1&rows=25&sidx=QuestionSetId&sord=asc&_nd=1226990109047&_search=false
>

Looks like the variable part is
  _nd=1226990109047
which can be extracted from the previous page using the Regex
Extractor Post-Processor.

You might find the HTML Link Parser will work for you (depends on how
the previous page is constructed). Worth a try, because it is simple
to add.

Just add all the parameters to the POST sample, and either use .* for
the _id (Link Parser) or use ${variable_name} (Regex Extractor)

>
>  Which should give me
>
>
>
>  RESPONSE
>
>
>
>  {"page":1,"total":1,"records":4,"rows":[{"id":"36","cell":["<a
>  href=\"EditQuestionSet.aspx?QuestionSetId=36\">\r\n
>     yyy</a>","Nov
>  17 2008","Nov 17 2008","7","Nov 17 2008"]},{"id":"42","cell":["<a
>  href=\"EditQuestionSet.aspx?QuestionSetId=42\">\r\n
>     other<>~!\"£$%^&*</a>","Nov
>  17 2008","Nov 17 2008","-","Nov 17 2008"]},{"id":"43","cell":["<a
>  href=\"EditQuestionSet.aspx?QuestionSetId=43\">\r\n
>     new</a>","Nov
>  17 2008","Nov 17 2008","1","Nov 17 2008"]},{"id":"44","cell":["<a
>  href=\"EditQuestionSet.aspx?QuestionSetId=44\">\r\n
>     Ù?تاÙ"بÛOبÙ"Ú(c)Ù.Ù?تاÙ"</a>","Nov
>  17 2008","Nov 17 2008","1","Nov 17 2008"]}]}
>
>
>  From here I should be able to use the regular expression extractor to
>  navigate to this users QuestionSetID.
>
>  I'll also post over on the jGrid forum as I think the next step is trying to
>  workout how the value for _nd=? is created in the POST to
>  GridDataHandler.ashx.
>  If I can find this I should be able to get the RESPONSE required in Jmeter.
>
>  jGrid link
>  http://www.trirand.com/blog/
>
>
>  Any suggestions?
>
>  Troy
>
>
>  --
>  NOTICE:
>  This e-mail message is intended only for the addressee(s) and contains
>  information which may be confidential If you are not the intended recipient
>  please advise the sender by return email, do not use or disclose the
>  contents, and delete the message and any attachments from your system.
>

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