Hi,
I am using gatling for 6 month or so. Now I have to use gatling for TIBCO JMS Testing for Req-rep service.
Gatling version : 2.3.1
Here is my script.I have copied all TIBCO jars to gatling/lib folder. Same request is working fine with loadrunner and jmeter. . For
package test
import io.gatling.core.Predef._
import io.gatling.jms.Predef._
import javax.jms._
import scala.concurrent.duration._
class BasicJMS3 extends Simulation {
val jmsConfig = jms
.connectionFactoryName(“DBE_XXX_NonPersistent”)
.url(“tibjmsnaming://JNDI-SDF-R.domain:30300,tibjmsnaming://JNDI-SDF-B.domain:30300,tibjmsnaming://JNDI-WSA-R.domain:30300,tibjmsnaming://JNDI-WSA-B.domain:30300”)
.credentials(“my.java.naming.security.principalVALUE”, “my.java.naming.security.credentialsVALUE”)
.contextFactory(“com.tibco.tibjms.naming.TibjmsInitialContextFactory”)
.listenerCount(1)
.useNonPersistentDeliveryMode
val scn = scenario(“JMS DSL test”).repeat(1) {
exec(jms(“req reply testing”)
.reqreply
.queue(“My.Request.retrieveIPRelationshipInformation”)
.textMessage(StringBody("""<soap:Envelope xmlns:soap=“http://www.w3.org/2003/05/soap-envelope” xmlns:mes=“http://www.ing.com/csp/xsd/general/message_2” xmlns:ret=“http://www.ing.com/be/cmdm/bicc/xsd/cmm/involvedpartymanagement_default_03/retrieveiprelationshipinformation_03” xmlns:bas=“http://www.ing.com/be/bis/xsd/general/BaseContextType_01” xmlns:pim=“http://www.ing.com/pim”>
soap:Header
mes:MessageHeader
mes:From
mes:Id1</mes:Id>
</mes:From>
mes:HeaderFields
mes:ConversationIdqsde</mes:ConversationId>
mes:MessageIdqsde</mes:MessageId>
mes:Timestamp2013-09-16T19:53:35.022+02:00</mes:Timestamp>
</mes:HeaderFields>
</mes:MessageHeader>
</soap:Header>
soap:Body
ret:RequestPayload
bas:ServiceConsumptionSpecifics
bas:NumberRecords8</bas:NumberRecords>
</bas:SizeLimitation>
</bas:ServiceConsumptionSpecifics>
bas:PayloadDescription/
</bas:BaseContext>
pim:retrieveIPRelationshipInformationREQ
pim:InvolvedParty
pim:EntrepriseId
pim:Type5</pim:Type>
pim:Identifier0123456789</pim:Identifier>
</pim:EntrepriseId>
</pim:InvolvedParty>
pim:InvolvedPartyToInvolvedPartyRoleType109</pim:InvolvedPartyToInvolvedPartyRoleType>
</pim:retrieveIPRelationshipInformationREQ>
</ret:RequestPayload>
</soap:Body>
</soap:Envelope>"""))
.property(“SOAPJMS_soapAction”, “retrieveIPRelationshipInformation”)
.property(“SOAPAction”, “retrieveIPRelationshipInformation”)
.property(“JMSExpiration”, 1500)
.property(“JMSPriority”, 4)
.property(“JMSDeliveryMode”, 1)
.jmsType(“TextMessage”)
.check(simpleCheck(checkBodyTextCorrect))
)
}
setUp(scn.inject(atOnceUsers(1)).protocols(jmsConfig))
def checkBodyTextCorrect(m: Message) = {
// this assumes that the service just does an “uppercase” transform on the text
m match {
case tm: TextMessage => tm.getText.contains(“ns1:StatusOK</ns1:Status”)
case _ => false
}
}
}
Getting following error.
12:22:56.358 [INFO ] i.g.j.c.JmsReqReplyClient - Got ConnectionFactory QueueConnectionFactory[URL=tcp://XXX;clientID=null;Properties={com.tibco.tibjms.ssl.enable_verify_host=false, com.tibco.tibjms.connect.attemptcount=100, com.tibco.tibjms.reconnect.attemptdelay=30000, com.tibco.tibjms.ssl.enable_verify_hostname=false, com.tibco.tibjms.connect.attempttimeout=15000, com.tibco.tibjms.reconnect.attempttimeout=15000, com.tibco.tibjms.multicast.enabled=true, com.tibco.tibjms.connect.attemptdelay=5000, com.tibco.tibjms.reconnect.attemptcount=100}]
12:22:56.561 [ERROR] a.a.OneForOneStrategy - Failed to connect to any server at: tcp://yyy:port,tcp://xxx:port [Error: authentication failed: url that returned this exception = TCP://xxx:port ]
javax.jms.JMSSecurityException: Failed to connect to any server at: tcp://yyy:port,tcp://xxx:port
In tibco server log, user is printing as ‘anonymous’.
Qs. what is missed here?