You are on page 1of 16

24/10/13

Document Display

HowtoRunLoadTestsonSOASuiteComponentsusingJMeter(DocID1384970.1)
Modified: 23May2013

Type: HOWTO

InthisDocument
Goal
Solution

Prerequisite

BPEL/Mediatorwebservice(HTTP)

BPEL/MediatorinvokedthroughJMSAdapter

BPEL/MediatorinvokedthroughMQAdapter

BPEL/MediatorinvokedthroughAQAdapter

BPEL/MediatorinvokedthroughDBAdapter

BPEL/MediatorinvokedthroughFTPAdapter

APPLIESTO:
OracleSOAPlatformVersion11.1.1.1.0to11.1.1.5.0[Release11gR1]
Informationinthisdocumentappliestoanyplatform.

GOAL
ThisarticlehelpstounderstandhowtorunaloadtestforaSOASuiteBPELprocessusingtheexternaltoolJMeter.

SOLUTION
TherearemultiplewaystorunaloadtestforSOASuitecomponents.ThisarticleistodemonstratehowtouseJMetertoruntheseloadtests.

Prerequisite

ThisarticleusestheopensourcetoolJMeter.JMetercanbedownloadedfromhttp://jmeter.apache.org/.ThisarticleexplainshowtogenerateloadbycreatingmultiplecallstoBPELprocessesorMedia
throughthefollowinginterfaces.
1.
2.
3.
4.
5.
6.

BPEL/MediatorWebservice(HTTP).
BPEL/MediatorinvokedthroughJMSAdapter
BPEL/MediatorinvokedthroughMQAdapter
BPEL/MediatorinvokedthroughAQAdapter
BPEL/MediatorinvokedthroughDBAdapter
BPEL/MediatorinvokedthroughFTPAdapter

BPEL/Mediatorwebservice(HTTP)
ThissectiondescribeshowtocreateloadonaBPELprocesswhichisexposedasawebserviceusingJMeter.
1.CopytheWSDLURLoftheBPELProcesswhichistobeloadtestedfromEMConsole.
Selectthecompositetobeloadtested
SelecttheTestbuttononthetoptolaunchtheTestWebservice.
CopytheURLfortheservicefromWSDLsection.

TorunatestwithJMeter,theHTTPURLissufficient.CopytheURLwithouttheWSDLpropertyattheend.
Forexample:

http://<soahost>:7001/soainfra/services/default/LoadTestProj/httpbpelprocess_client_ep

2.InthesameTestWebServiceScreengotothebottomofthepageandcopythepayloadtobeusedfortheBPELservice.
Forexample:

https://support.oracle.com/epmos/faces/SearchDocDisplay?_adf.ctrl-state=ksi2u85kw_9

1/16

24/10/13

Document Display

<soap:Envelopexmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Bodyxmlns:ns1="http://xmlns.oracle.com/LoadTestApp/LoadTestProj/HTTPBpelProcess">
<ns1:process>
<ns1:input>Muthu</ns1:input>
</ns1:process>
</soap:Body>
</soap:Envelope>

3.LaunchJMeter.
4.RightclickTestPlanandAdd>Threads(Users)>ThreadGrouptocreateanewThreadgroup.

5.Namethethreadgroup(forexampleBpelHTTPTest).
6.SpecifytheThreadproperties.

a.No.ofThreadsTotalnumberofconcurrentthreadsrequiredforthisloadtest.
b.RampupperiodHowlongtotaketoinitiateallthethreadsspecifiedinNo.ofThreadsparameter.ForexampleifNo.ofThreadsis10andtheRampupperiodis100seconds,thenitwilltake
tostartallthethreads.
c.LoopCount.Howmanytimeseachthreadshouldbeexecuted.

Foreexample,intheabovescreenshot,

No.ofThreads=5
RampUpPeriod=0seconds
Loopcount=100

Theabovethreadgroupwillrun5concurrentthreads(immediatelycreate5concurrentthreadsbecausetheRampupperiodis0),eachthreadwillbeexecuted100times,whichresultsin500requests.
example,theaboveparameterscanbeconfiguredaccordingtotherequirement.

7.SavetheTestplanbeforemakinganymoreconfiguration.
8.NowAddthesampler(whichistheonethatwillsendrequesttotheendservice,inourexampletoBPEL)byrightclickingthenewlycreatedThreadGroup>Add>Sampler>SOAP/XMLRPCReque

https://support.oracle.com/epmos/faces/SearchDocDisplay?_adf.ctrl-state=ksi2u85kw_9

2/16

24/10/13

Document Display

9.Configurethesampler
a.Providethenameforthesampler(forexampleBPELWebserviceTest)
b.IntheURLField,entertheURLvaluewhichwascopiedinstep1.Forexamplehttp://<soahost>:7001/soainfra/services/default/LoadTestProj/httpbpelprocess_client_ep
c.IntheSOAP/XMLRPCDatafield,entertheSOAPEnvelopecopiedfromEMConsoleinstep2.
d.Savechanges.

10.Abovestepsaresufficienttosendloadtotheendservice.Buttounderstandwhethertherequestissuccessfulornot,weneedtocapturetheresult.JMeterprovidesmultiplewaysorformatstocaptu
samplewearegoingtoaddsomeofthem.
11.Addlistenerconfigurationsasbelow.
a.RightclicktheSamplerandselectAdd>Listener>ViewResultsinTree
b.RightclicktheSamplerandselectAdd>Listener>ViewResultsinTable
c.RightclicktheSamplerandselectAdd>Listener>SummaryReport.
(Allthelistenerswilldisplayresultsinadifferentformat.Addthelistenersaccordingtoyourneed).

https://support.oracle.com/epmos/faces/SearchDocDisplay?_adf.ctrl-state=ksi2u85kw_9

3/16

24/10/13

Document Display

12.SavechangesandtheJMeterprojectiscompletelyreadytorunthetest.
13.MakesuretheBPELserverisupandrunning.
14.IntheJMetermenu,Run>Start.ThiswillstartsendingrequesttotheendpointconfiguredandtheListenerswhichhavebeenaddedinstep11willshowtheresultsimmediately.
ForexamplethisisaresultviewofonerequestinViewResultsinTreeformat.

15.CheckinEMConsolewhetherthecompositeinstancesarecreatedforthetestrun.Intheabovetestrun500requestsshouldbesenttotheBPELServiceLoadTestProj>httpbpelprocess_client_ep

https://support.oracle.com/epmos/faces/SearchDocDisplay?_adf.ctrl-state=ksi2u85kw_9

4/16

24/10/13

Document Display

SampleFiles
SampleJMeterPlanfileforHTTPBPELTestcanbedownloadedfromhere
SampleSOAprojectexposedasawebservicecanbedownloadedfromhere

.
.

BPEL/MediatorinvokedthroughJMSAdapter

IftheBPEL/MediatorinstanceisinvokedthroughJMSAdapter,itisrequiredtoloadtheJMSqueuewithmessagestoruntheloadtest.ThissectionshowshowtoloadtherelatedWebLogicJMSqueueu
1.Copywlthint3client.jarfrom<WL_HOME>/server/libfolderto<JMeter_Home>/libfolderandrestartJMeterforthenewjarfileadditiontotheclasspathtotakeeffect.
2.Followthesteps37fromBPEL/MediatorwebservicesectiontocreatetheTestPlanandtheThreadgroup.NametheThreadgroup.
3.AddJMSPointtoPointsamplerbyrightclickingtheThreadGroup>Add>Sampler>JMSPointtoPoint.
4.ConfiguretheJMSPointtoPoint
a.NameNameSamplerwithameaningfulname.(ForexampleBPELJMSTest)
b.QueuConnectionFactoryProvideavalidconnectionfactoryJNDIname.(ForexampleLoadTestCF)
c.JNDINameRequestQueueProvideavalidQueueJNDIName(ForexampleLoadTestCF)
d.CommunicationStyleRequestonly
e.Inthecontentsection,enterthepayloadtobesenttotheJMSqueue.
Forexample
<open:getGreetingxmlns:open="http://www.openuri.org/">
<open:name>Muthu</open:name>
</open:getGreeting>
f.ForInitialContextFactoryenterthevalueweblogic.jndi.WLInitialContextFactory
g.ForProviderURLentertheServerURLwherethequeueislocated.(Foreg.t3://<soahost>:7001)
h.Savethechanges.

https://support.oracle.com/epmos/faces/SearchDocDisplay?_adf.ctrl-state=ksi2u85kw_9

5/16

24/10/13

Document Display

WLSResourcesscreenshottoshowhowyougettheQueueNameandConnectionFactoryNameintheWLSconsole(http://<adminurl>:7001/console):

5.Followthesteps11fromBPEL/Mediatorwebservicesectiontocreatethelistenersfortheabovesampler.
6.SavetheTestplan.
7.GotomenuRun>Start.ThiswillstartsendingrequesttotheJMSQueuereferredbytheplan.
8.ChecktheListenerswhethertherequestissuccessfulornot.

https://support.oracle.com/epmos/faces/SearchDocDisplay?_adf.ctrl-state=ksi2u85kw_9

6/16

24/10/13

Document Display

Intheabovescreenshot,100requestsaresentandError%is0.00whichindicatesallaresuccessfullysenttotheJMSQueue.
9.CheckwhethertheBPEL/MediatorandJMSAdaptergotinvokedbytheJMSMessage.

SampleFiles
SampleJMeterPlanfileforsendingmessagestoJMSQueuecanbedownloadedfromhere
SampleSOAprojectusingJMSAdaptercanbedownloadedfromhere

BPEL/MediatorinvokedthroughMQAdapter
IftheBPEL/MediatorinstanceisinvokedthroughMQAdapter,itisrequiredtoloadtheMQqueuewithmessagestoruntheloadtest.ThissectionshowshowtoloadtheMQqueueusingJMeter.
1.CreateabindingsfilethroughJMSAdminUtilityprovidedbyMQforJMetertosendmessagestoMQ.JMSAdminutilityislocatedin<MQ_Install>\java\binfolder.
EditJMSAdmin.configfileforthebelowentriesandsavethechanges.

INITIAL_CONTEXT_FACTORY=com.sun.jndi.fscontext.RefFSContextFactory
PROVIDER_URL=file:D:\\JNDIDirectory

CreatethetextfilewithalltheconfigurationrequiredforcreatingConnectionFactory,Queueinthebindingsfile.Forexample:

#
#MQConfigurationhasMyQMasQueueManagerforthistesting
#MQhasSourceMQQueuequeueforthistesting.
#Deletequeueconnectionfactory
DELETEQCF(LoadQCF)
#definequeueConnectionFactoryonthequeuemanagerinMQ.
DEFINEQCF(LoadQCF)qmgr(MyQM)tran(client)chan(SYSTEM.DEF.SVRCONN)+
host(xx.xxx.xx.xxx)port(1414)
DISPLAYQCF(LoadQCF)
#
#DeletetheQueueifitexists
DELETEQ(SourceMQQueue)
#DefinetheQueue
DEFINEQ(SourceMQQueue)qmgr(MyQM)qu(SourceMQQueue)
#DisplaytheresultingQueuedefinition
DISPLAYQ(SourceMQQueue)
#
#ENDOFJNDIDEFINITIONS
#

https://support.oracle.com/epmos/faces/SearchDocDisplay?_adf.ctrl-state=ksi2u85kw_9

7/16

24/10/13

Document Display

#
end

Savethefilewithaname(forexampleJms.scp).
Runthebelowcommandtocreatethebindingsfile

JMSAdmin.batv<jms.scp

CheckthelocationspecifiedinPROVIDER_URLandverifythata.bindingsfileiscreated.ThisfilewillbeusedinJMetertosendthemessagetoMQ.

2.CopythebelowjarsfromyourMQInstallationintoJMeter/libfolderandrestartJMeterforthenewlibrariestobeaddedintoitsclasspath.

com.ibm.mq.jar
com.ibm.mqjms.jar
dhbcore.jar
fscontext.jar
providerutil.jar
connector.jar

Forthisarticle,theabovelibrariesarecopiedfromaMQ6installation.IfyourMQversionisdifferent,pleaserefertoyourMQdocumentationandaddtherelatedclientlibraries.JMeterwillneedallther
librariesfromMQ.
3.Followthesteps37fromBPEL/MediatorwebservicesectiontocreatetheTestPlanandtheThreadgroup.
4.AddJMSPointtoPointsamplerbyrightclickingtheThreadGroup>Add>Sampler>JMSPointtoPoint
5.ConfiguretheJMSPointtoPoint
a.NameNameSamplerwithameaningfulname.(ForexampleBPELMQTest)
b.QueuConnectionFactoryProvideavalidconnectionfactoryJNDIname.(ForexampleLoadQCF)
c.JNDINameRequestQueueProvideavalidQueueJNDIName(ForexampleSourceMQQueue)
d.CommunicationStyleRequestonly
e.Inthecontentsection,enterthepayloadtobesenttotheJMSQueue.
Forexample:
<open:getGreetingxmlns:open="http://www.openuri.org/">
<open:name>Muthu</open:name>
</open:getGreeting>
f.ForInitialContextFactoryenterthevaluecom.sun.jndi.fscontext.RefFSContextFactory
g.ForProviderURLentertheURLwherethebindingfilewascreatedearlierinstep1.(Forexamplefile:D:\\JNDIDirectory)
h.Savethechanges.

https://support.oracle.com/epmos/faces/SearchDocDisplay?_adf.ctrl-state=ksi2u85kw_9

8/16

24/10/13

Document Display

6.Followthesteps11fromBPEL/Mediatorwebservicesectiontocreatethelistenersfortheabovesampler.
7.SavetheTestplan.
8.GotomenuRun>Start.ThiswillstartsendingrequesttotheJMSQueuereferredbytheplan.
9.ChecktheListenerswhethertherequestissuccessfulornot.

https://support.oracle.com/epmos/faces/SearchDocDisplay?_adf.ctrl-state=ksi2u85kw_9

9/16

24/10/13

Document Display

10.CheckEMConsoleandseewhethertheinstancesaregettinginvokedornot.

SampleFiles
SampleJMeterPlanfileforSendingmessagestoMQQueuecanbedownloadedfromhere
SampleSOAprojectusingMQAdaptercanbedownloadedfromhere

BPEL/MediatorinvokedthroughAQAdapter
IftheBPEL/MediatorinstanceisinvokedthroughAQAdapter,itisrequiredtoloadtheAQqueuewithmessagestoruntheloadtest.ThissectionshowshowtoloadtheAQqueueusingJMeter.

ThistestusesaproceduretoloadthedataintoAQQueue.TheprocedurecanberunindependentlythroughanySQLClient.RunningthroughJMeterwillgivemoreoptionsofcontrolandrunningmultiple
1.Followthesteps37fromBPEL/MediatorwebservicesectiontocreatetheTestPlanandtheThreadgroup.Nametheplan(ForexampleAQBPELLoadTest)
2.AddaJDBCconnectionbyrightclickingThreadGroup>Add>ConfigElement>JDBCConnectionConfiguration.
Nametheconfiguration.(ForexampleAQJDBCConn).
Provideavariablename(forexampleAQJDBCConn).
Specifytheconnectionpoolparametersaccordingtoyourrequirement.
EnterDatabaseConfiguration.
oDatabaseURL(foreg.jdbc:oracle:thin:@dbhost:1521/sid).
oJDBCDriverClassoracle.jdbc.xa.client.OracleXADataSource.
oUsernameAQschemausernamewhereAQQueueislocated.
oPasswordAQSchemapassword.

3.CreateaJDBCRequestSamplerbyRightclickingThreadgroup>Add>Sampler>JDBCRequest
NametheSampler(ForexampleAQLoadTest).
EnterthevariablenamefortheJDBCconnectioncreatedonStep2.(ForexampleAQJDBCConn).
SelectthequerytypeasCallableStatement.
EnterthestoredproceduretoloadthedataintoAQQueue.
ForexamplebelowisasimplescriptforanAQQueueacceptingXMLpayload:

https://support.oracle.com/epmos/faces/SearchDocDisplay?_adf.ctrl-state=ksi2u85kw_9

10/16

24/10/13

Document Display

ForexamplebelowisasimplescriptforanAQQueueacceptingXMLpayload:

declare
msgSYS.XMLType
queue_optionsDBMS_AQ.ENQUEUE_OPTIONS_T
msg_propsDBMS_AQ.MESSAGE_PROPERTIES_T
msg_idRAW(16)
begin
formesgnoin1..10loop
msg:=SYS.XMLType.createXML('<simplexmlns="http://www.oracle.com/soa/sandbox"><content>'||mesgno||'</content></simple>')
DBMS_AQ.ENQUEUE(queue_name=>'QIN',
enqueue_options=>queue_options,
message_properties=>msg_props,
payload=>msg,
msgid=>msg_id)
commit
endloop
end
Savetheconfig.

https://support.oracle.com/epmos/faces/SearchDocDisplay?_adf.ctrl-state=ksi2u85kw_9

11/16

24/10/13

Document Display

4.Followthesteps11fromBPEL/Mediatorwebservicesectiontocreatethelistenersfortheabovesampler.
5.SavetheTestplan.
6.GotomenuRun>Start.ThiswillstartsendingrequesttotheAQQueue
7.ChecktheListenerswhethertherequestissuccessfulornot.

8.CheckEMConsolewhethertheinstancescreatedsuccessfully.

SampleFiles
SampleJMeterPlanfileforSendingmessagestoAQQueuecanbedownloadedfromhere
SampleSOAprojectusingAQAdaptercanbedownloadedfromhere

BPEL/MediatorinvokedthroughDBAdapter
IftheBPEL/MediatorinstanceisinvokedthroughDBAdapter,itisrequiredtoloadtheDBtablewithrecordstoruntheloadtest.ThissectionshowshowtoloadtheDBtableusingJMeter.
1.CreateJDBCConnectionandtheTestPlanasmentionedinBPEL/MediatorinvokedthroughAQAdaptersteps1and2.NametheconnectionandTestplan.
2.Createacountertocreateavariablenumbertodifferentiateeachrecordintable.Counterwillcreatearunningsequencenumberwhichcanbeusedtocreatedifferentdataforeachrecord.
Namethecounter.
Enterstart,incrementandthemaximumvalueforthecounter
Provideareferencenameforthecounterwhichwillbeusedinthesamplertogetthevaluefromthiscounter.

https://support.oracle.com/epmos/faces/SearchDocDisplay?_adf.ctrl-state=ksi2u85kw_9

12/16

24/10/13

Document Display

3.CreateaJDBCRequestSamplerbyrightclickingThreadgroup>Add>Sampler>JDBCRequest
NametheSampler(ForexampleAQLoadTest)
EnterthevariablenamefortheJDBCconnectioncreatedinstep1.
SelecttheQueryTypeasPreparedStatementUpdate.
Entertheinsertqueryaccordingtothetablecolumns.Fortesting,wecreatedatablewiththefollowing2columns.
"ROLLNO"NUMBERNOTNULLENABLE,
"NAME"VARCHAR2(50BYTE)

Theinsertqueryusedfortheabovetableis.

INSERTINTOSTUDENT1VALUES(?,?)

Theabovequeryusesdynamicparametervalueswhicharespecifiedby?.
Entertheparametervalues.Sincetheabovesampleuses2dynamicvalues,Parametervalueshouldhave2entries,

${rollNo},Muthu${rollNo}

Firstentryisjustaninteger.Secondentryisanameandappendedwiththecountervaluetocreateauniquename.
Intheabovesample,rollNoistheReferenceNamecreatedonthecounteronstep2.
Entertheparametertypes.(commaseparatedforeachparameter).

4.Followthesteps11fromBPEL/Mediatorwebservicesectiontocreatethelistenersfortheabovesampler.
5.SavetheTestplan.
6.GotomenuRun>Start.ThiswillstartinsertingrecordsintotheDBTable.
7.ChecktheListenerswhethertherequestissuccessfulornot.

https://support.oracle.com/epmos/faces/SearchDocDisplay?_adf.ctrl-state=ksi2u85kw_9

13/16

24/10/13

Document Display

8.LogintoEMConsoleandcheckwhethertheDBAdapteranditsresourcesareinvoked.

SampleFiles
SampleJMeterPlanfileforinsertingrecordsintoDBtablecanbedownloadedfromhere
SampleSOAprojectusingJMSAdaptercanbedownloadedfromhere

BPEL/MediatorinvokedthroughFTPAdapter
IftheBPEL/MediatorinstanceisinvokedthroughFTPAdapter,itisrequiredtoloadtheftpserverwithmultiplefiles.ThissectionshowshowpopulatemultiplefilesusingJMeter.
1.Followthesteps37fromBPEL/MediatorwebservicesectiontocreatetheTestPlanandtheThreadgroup.NametheThreadgroup.
2.Followstep2fromBPEL/MediatorinvokedthroughDBAdaptertocreateacountertogeneratedynamicfilename.

https://support.oracle.com/epmos/faces/SearchDocDisplay?_adf.ctrl-state=ksi2u85kw_9

14/16

24/10/13

Document Display

3.CreateaFTPSamplerrequestbyrightclickingThreadgroup>Add>Sampler>FTPRequestandconfigurethesamplertosendfilestoftpserver.
ServernameorIP:Specifytheftpserverlocation
Portno:Specifytheftpserverportnumber
Entereitheralocalfileorlocalfilecontentsforthefiletobepopulated.
SelectPutoptionasthissamplerisgoingtocreateafileinftpserver.
Entertheloginconfiguration(usernameandpasswordfortheftpserver).

4.Followthesteps11fromBPEL/Mediatorwebservicesectiontocreatethelistenersfortheabovesampler.
5.SavetheTestplan.
6.GotomenuRun>Start.ThiswillstartinsertingrecordsintotheDBTable.
7.ChecktheListenerswhethertherequestissuccessfulornot.

8.CheckEMConsoleandbesuretheFTPAdapterisabletopickthefilesandtheinstancesarecreated.

https://support.oracle.com/epmos/faces/SearchDocDisplay?_adf.ctrl-state=ksi2u85kw_9

15/16

24/10/13

Document Display

8.CheckEMConsoleandbesuretheFTPAdapterisabletopickthefilesandtheinstancesarecreated.

SampleFiles
SampleJMeterPlanfileforcreatingfilesonFTPServercanbedownloadedfromhere
SampleSOAprojectusingFTPAdaptercanbedownloadedfromhere

https://support.oracle.com/epmos/faces/SearchDocDisplay?_adf.ctrl-state=ksi2u85kw_9

16/16

You might also like