Monday, November 7, 2011

Simulating SOAP messages via JMS in LoadRunner using Web Services Protocol

Web services facilitate application to application communication for building integrated systems of web application components and HTTP is the most standard transport protocol used for the communication but it will be difficult to send messages from one subsystem to many using HTTP. Sending SOAP messages via JMS is a viable and a simple option for such requirements.


JMS is a J2EE standard for sending messages, either text or Java objects, between Java clients.


There are two scenarios for communication:


Point-to-Point. JMS implements point-to-point messaging by defining a message queue as the target for a message. Multiple senders send messages to a message queue, and the receiver gets the message from the queue.


Publish-Subscribe. Each message is sent from one publisher to many subscribers through a designated topic. The subscribers only receive messages sent after they have subscribed.


LoadRunner supports both the communication but I will focus sending SOAP over JMS point-to-point communication using LoadRunner in this post.


Vugen supports point to point by allowing you to send and receive JMS messages to and from a queue.


Please follow the steps to simulate JMS traffic to TIBCO in LoadRunner


       1.    Install JDK and set the class path accordingly

       2.    Download TIBCOjms.jar file from the application support team and set the class path of the jar in VUGEN- Runtime settings – Classpath

       3.    Request your application team to provide the following details and update in  Runtime settings

a.    JNDI Initial Context Factory - com.tibco.tibjms.naming.TibjmsInitialContextFactory (For Tibco)

b.    JNDI Provider URL

c.     JNDI Context Factory

d.    Credentials(userid/Password)


       4.    Create a Sample script to verify the connection


Action{

char text[100];

strcpy(text,"Sample Message to be Send to TIBCO");

lr_output_message("%s text is ", text);

//sending message

jms_send_message_queue("Sending message",text, "QueueName");

return 0;

}

JMS Runtime Settings for Point-to-Point
JMS Runtime Settings

2 comments:

  1. Excellent article!!! LoadRunner is popular automation testing tool used for validating a software application/system under load. It delivers most precise information about the performance, functionality and behavior of the software product. Best Loadrunner training in Chennai | Loadrunner training

    ReplyDelete
  2. how to close this connection after posting message into the queue??

    ReplyDelete