Hi Dave/Sebb,
Thank you for your quick reply.
I have tried the same JMeter script with Regular Expression. The problem is
Regular Expression is unable to read inner HTML code used to implement for
AJAX technology in my application.
Please find below the full description of the problem faced with
JMeter2.0.3:
Solution Tried: Regular Expression
Problem Faced: JMeter is unable to read inner HTML which is used in AJAX
implementation. [e.g. for reading auto-generated Folder Id on the
HTML] Page
Outcome: Regular Expression is unable to read inner HTML.
Solution Tried: Static Values for each virtual user using User Defined
Variables.
Problems Faced: 1. requires lot of efforts while working with more than 50
Users.
2. Dynamic features like Upload, Move can not have
static values.
Outcome: It's hectic to use Static values for Load Testing
Solution Tried: Java Script [Used Defined Functions] for dynamic values.
Problem Faced: JMeter is unable to read the Java Script as per mentioned by
you and Sebb.
Can you guide me about what can I do for the above problems for using
JMeter?
Will it be useful if I use Pearl Script instead of Java Script?
It would be of great help to me and my project mates.
Thanks in advance,
Tapaswini
-----Original Message-----
From: David Bronner [mailto:[EMAIL PROTECTED]
Sent: Friday, April 21, 2006 10:18 PM
To: JMeter Users List
Subject: Re: Where to declare the java script with the help of function and
how to call this function in JMeter
Hi Tapaswini,
I don't think you can evaluate the javascript that you're trying to run.
JMeter doesn't provide access to the HTML DOM. However, you can probably
achieve the same result by using regular expression post processors to
search for string matches instead of parsing the HTML tags.
Sebb - those are all options for defining variables with a fixed value, but
I want to keep assigning new values to them. For example, in one of my
scripts, I want to assign the unix epoch (seconds since 1970) into a
variable once per loop. Right now I'm doing it by sticking the javascript
into the template field of a regex parser. Can I do this using any of the
options you listed? I tried this using the User Defined Variables config
element, but it doesn't seem that the javascript is getting evaluated on
each loop if I put it in the Value column.
-Dave
On 4/21/06, Tapaswini Das <[EMAIL PROTECTED]> wrote:
>
>
> Hi,
>
> Could somebody explain how to use the new JavaScript function?
> I'm writing my own Java Script functions to read inner HTML of the
> application. I need to map these functions with JMeter so that JMeter can
> call them while running. Or
>
> I can put all my functions into a single file and call them by any other
> way? And if it is possible then in which way I'll call the functions?
> In a way what's the mechanism JMeter uses to call the User Defined
> Functions.
>
> Thanks & Regards,
> Tapaswini
>
> -----Original Message-----
> From: sebb [mailto:[EMAIL PROTECTED]
> Sent: Friday, April 21, 2006 2:07 PM
> To: JMeter Users List
> Subject: Re: Where to declare the java script with the help of function
> and
> how to call this function in JMeter
>
> It's not possible to define new javascript functions presently.
>
> Please explain WHAT you are trying to do, and then someone can help
> with the HOW.
>
> S.
> On 21/04/06, Tapaswini Das <[EMAIL PROTECTED]> wrote:
> >
> > Hi Dave,
> >
> > Can you please tell me how to use this java script through inserting
> > dummy regex parsers and assigning the JavaScript output where? Can you
> > please tell me the flow "where n how to declare java script function and
> > where write java script?"
> > Please reply me its urgent.
> >
> > Thanks in Advanced
> > Tapaswini
> >
> >
> > -----Original Message-----
> > From: David Bronner [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, April 20, 2006 10:05 PM
> > To: JMeter Users List
> > Subject: Re: Where to declare the java script with the help of function
> and
> > how to call this function in JMeter
> >
> > AFAIK, you can use javascript in almost any field with the syntax
> > ${__javaScript()} However, I have basically the same question...where
> are
> > we supposed to do assignments to variables with values generated by
> > javascript? I've been inserting dummy regex parsers and assigning the
> > javascript output there, but it seems like there has to be a better way.
> It
> > would be great if there were a pre-processor that just assigned values
> to
> > variables.
> >
> > -Dave
> >
> > On 4/19/06, Tapaswini Das <[EMAIL PROTECTED]> wrote:
> > >
> > > Hi All,
> > >
> > >
> > >
> > > I'm using JMeter 2.0.3 for Load testing.
> > >
> > > My Test case is to create a document through one user and before
> uploading
> > > the ppt the ID is created then after in file properties page upload
> the
> > > slides. Each user create different Document id which generated by the
> > > application and showed in the http request of JMeter.
> > >
> > >
> > >
> > > I've JavaScript can any one tell me how I'll use these java scripts so
> > > that
> > > each user can create different document at a time by load script.
> > >
> > >
> > >
> > > "Where to declare the java script with the help of function and how to
> > > call
> > > this function in JMeter "
> > >
> > >
> > >
> > >
> > >
> > > Javascripts
> > >
> > >
> > >
> > > 1.function getTestForm(paneId, object){
> > >
> > > var frms = document.forms;
> > >
> > > for (var i=0;i<frms.length;i++) {
> > >
> > > var frm = frms[i];
> > >
> > > if (frm.name.indexOf(paneId) > - 1) {
> > >
> > > if(object == 'folder') return
> > > getFolderId(frm);
> > >
> > > else if(object == 'component')
> return
> > > getComponentId(frm);
> > >
> > > else if(object == 'document')
> return
> > > getDocumentId(frm);
> > >
> > > }
> > >
> > > }
> > >
> > > return null;
> > >
> > > }
> > >
> > >
> > >
> > > 2.function getFolderId(f){
> > >
> > > if (f.folderId != null && f.folderId != 'undefined')
> > >
> > > return f.folderId.value;
> > >
> > > else
> > >
> > > null;
> > >
> > > }
> > >
> > >
> > >
> > > 3.function getDocumentId(f){
> > >
> > > if (f.documentId !=null && f.documentId != 'undefined')
> > >
> > > return f.documentId.value;
> > >
> > > else
> > >
> > > null;
> > >
> > > }
> > >
> > >
> > >
> > > 4.function getComponentId(f){
> > >
> > > if (f.componentId !=null && f.componentId != 'undefined')
> > >
> > > return f.componentId.value;
> > >
> > > else
> > >
> > > null;
> > >
> > > }
> > >
> > >
> > >
> > >
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]