You can define variables using:

* The Test Plan
* User Defined Variables Config item
* CSV Data Set Config Item
* User Parameters Pre-Processor

S.
On 20/04/06, David Bronner <[EMAIL PROTECTED]> wrote:
> 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]

Reply via email to