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;

}

 

Reply via email to