Nexial Automation

Test Automation Platform for everyone!

X

jms

JMS standards Java Messaging Service.  It is an essential feature in the Java Enterprise Edition specification (since v1.4).  You can get more introductory content about JMS here, here and here.

With regards to JMS, Nexial’s aim is not to implement every single JMS capability.  From test automation standpoint, the bulk of the message interaction evolves around “send message” and “receive message”.  These 2 operations are currently supported in Nexial.  Based on needs and demand, we might possibly implement other JMS operations, such as DELETE.

Connection Configuration

Similar to other commands that interact with remote system, the JMS commands require a “configuration” object to specify the connectivity and security credential.  These set of configurations are “bundled” together under a name, such as MyServer.  Below is a table to outline such configurations:

configuration name value explanation
MyServer.provider Possible values:
  • activemq
  • webspheremq
  • rabbitmq
  • jndi
[REQUIRED]
More options could be added on as-needed basis. Raise an issue if your JMS vendor is not on this list.

For <codewebspheremq</code> (WebSphere MQ), additional jar files are required to be added to the ${NEXIAL_HOME}/lib directory. Visit here to learn more about the required WebSphere MQ client jar files.
MyServer.url e.g.:
  • amqp://[HOST]:[PORT]/
  • tcp://[HOST]:[PORT]/
  • jnp://[HOST]:[PORT]/
[REQUIRED]
The URL or URI specific to the target Message server. This is usually vendor specific (except for JNDI-based JMS server). Check product documentation or IT support for details.

For RabbitMQ, the url starts with amqp:// or amqps://. Note that the virtual host (aka virtual context) is specified as the part of the url. For a virtual host of /, end the url with /.

For WebSphereMQ, the url consists of a list of listeners in the form of host(port). For example, server1(port1),server2(port2).

For ActiveMQ, the url starts with tcp:// or tcps://.

For JNDI-based JMS server, the url would be the standard JNDI url - jnp://host:port/.
MyServer.username the username to access the target JMS server [REQUIRED] if required by JMS server and provider is not jndi
Consider using nexial-crypt to protect sensitive information.
MyServer.password the password to access the target JMS server [REQUIRED] if required by JMS server and provider is not jndi
Consider using nexial-crypt to protect sensitive information.
MyServer.destination either topic or queue name [REQUIRED]
useisTopicto determine if this destination is a queue or a topic.
MyServer.isTopic true or false specify as true if your destination is a Topic. Default is false.
MyServer.initialContextFactory For JNDI-based JMS access only.

[REQUIRED] if provider is jndi
Specifying the initial context factory to use. The value of the property should be the fully qualified class name of the factory class that will create an initial context. This would be synonymous to "java.naming.factory.initial".
MyServer.connectionFactory For JNDI-based JMS access only.

[REQUIRED] if provider is jndi
Specify the JNDI name of the object that provides connection to the target JMS server. Consult vendor documentation or IT Support for details.
MyServer.jndiUsername For JNDI-based JMS access only.

[REQUIRED] if provider is jndi
Specify the username to access the target JNDI server. This would be synonymous to "java.naming.security.principal".
MyServer.jndiPassword For JNDI-based JMS access only.

[REQUIRED] if provider is jndi
Specify the password to access the target JNDI server. This would be synonymous to "java.naming.security.credentials".
MyServer.channel For WebSphereMQ access only.

[REQUIRED] if provider is webspheremq

The channel name by which the intended JMS connections and operations will be connected. Check vendor documentation or IT Support for details.
MyServer.queueManager For WebSphereMQ access only.

[REQUIRED] if provider is webspheremq
The name of the queue manager from which the message operations will be issued. Check vendor documentation or IT Support for details.

Examples

  • WebSphereMQ
  • ActiveMQ
  • RabbitMQ

Available Commands