0
votes

I am new to TIBCO and trying to communicate with EMS Server using loadrunner.

The communication between the client and server takes place generally over TCP.

I have following details with me:

  • URL: tcp://someserver.com:port
  • Username:
  • Password:
  • Queue Connection Factory: QueueConnectionFactory

Did any one try publishing messages on EMS Server with Loadrunner.

Please suggest on how can I start scripting?

3
Did you try anything ? Please show any research effort you made on this questionRafalon
i tried using soap request and imported xml(mesg), but it shows only endpoint url, where can i provide the target queue name?Neha
I dont know whether doing a soap request is a good approach.just trying.Neha
Can i use JMS protocol to send message to EMS as it is the extension to JMSNeha

3 Answers

0
votes

I believe you should be using tibjmsnaming:// not tcp. and Keep the needed JMS/EMS libraries available in the Path.

you should be using WebServices template. I remember publishing messages to Load runner long back.

0
votes

You have a number of paths to any JMS compliant target. Some use web services protocol. My preference is a small Java template virtual user leveraging the appropriate connection factory elements. Very likely your queue solution also has a C level interface which could be incorporated into a C template virtual user. You have options for a virtual user developed in Visual Studio (see documentation, advanced topics) using C++/C#/VB. If you have an existing client you may even be able to record a "push" and a "pop" from the queues with Winsock and manipulate the appropriate buffers for exercise - I have used this path with MQ in the past.

So, lots of options based upon your skills, your licensed virtual user types, etc...

0
votes

After searching it on google and trying out with different protocols, i found out a simple way to publish message on EMS server.
As EMS is an extension of JMS(java messaging service) we have to use jms protocol to communicate with EMS.
Using a java vuser in VUGEN is the best option.
Below is the code you can paste in actions.java file.

public int action() throws Throwable {
        String serverUrl = "tcp://localhost:7222";
        String userName = "admin";
        String password = "admin";

        String queueName = "your queue name";

        try {
        System.out.println("Sending JMS message to server " + serverUrl + "...");

        QueueConnectionFactory factory = new TibjmsQueueConnectionFactory(serverUrl);
        QueueConnection connection = factory.createQueueConnection(userName, password);
        QueueSession session = connection.createQueueSession(false, javax.jms.Session.AUTO_ACKNOWLEDGE);

        // Use createQueue() to enable sending into dynamic queues.
        Queue senderQueue = session.createQueue(queueName);
        QueueSender sender = session.createSender(senderQueue);

        /* publish messages */

        TextMessage jmsMessage = session.createTextMessage("your message");
        //String text = (String) data.elementAt(i);
        //jmsMessage.setText(text);
        sender.send(jmsMessage);
        System.out.println("Sent message!");


        connection.close();
        } catch (JMSException e) {
        e.printStackTrace();
        System.exit(0);
    }
        return 0;
}//end of action