On 21/04/06, David Bronner <[EMAIL PROTECTED]> wrote: > 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.
It will get re-evaluated if you use the User Parameters pre-processor. > -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]