51Testing软件测试论坛

标题: 用jmeter测试websphere mq [打印本页]

作者: clive    时间: 2015-6-18 22:28
标题: 用jmeter测试websphere mq
有人用jmeter测试过websphere mq吗?
我总是无法设置好initial context factory
导入了mq的jar包,仍然无法设置。

作者: jingzizx    时间: 2015-6-19 12:40
人家的经验,目前自己没用过.你参考一下.
使用JMeter进行压力测试时,所有的JMeter依赖的包需要复制到%JMETER_HOME%/lib目录下。对于ActiveMQ来说,就是复制%ACTIVEMQ_HOME%/lib目录下jar包,可根据实际情况来考虑是否复制。JMeter在测试时使用了JNDI,为了提供JNDI提供者的信息,需要提供jndi.properties。同时需要将jndi.properties放到JMeter的%JMETER_HOME%/lib和%JMETER_HOME%/bin目录中,还需要将jndi.properties与%JMETER_HOME%/bin目录下的ApacheJMeter.jar打包在一起。对于ActiveMQ,jndi.properties的演示内容如下:
1 #java.naming.factory.initial = org.activemq.jndi.ActiveMQInitialContextFactory
2 java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory
3 java.naming.provider.url = tcp://localhost:61616
4
5 #指定connectionFactory的jndi名字,多个名字之间可以逗号分隔。
6 #以下为例:
7 #对于topic,使用(TopicConnectionFactory)context.lookup("connectionFactry")
8 #对于queue,(QueueConnectionFactory)context.lookup("connectionFactory")
9 connectionFactoryNames = connectionFactory
10
11 #注册queue,格式:
12 #queue.[jndiName] = [physicalName]
13 #使用时:(Queue)context.lookup("jndiName"),此处是MyQueue
14 queue.MyQueue = example.MyQueue
15
16 #注册topic,格式:
17 # topic.[jndiName] = [physicalName]
18 #使用时:(Topic)context.lookup("jndiName"),此处是MyTopic
19 topic.MyTopic = example.MyTopic




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2