如何测试使用JMeter一个WCF web服务? [英] How to test a WCF Webservice with JMeter?

查看:213
本文介绍了如何测试使用JMeter一个WCF web服务?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个WCF Webservice的IIS上承载的这暴露了有三个整数参数一个方法。我有一个简单的,基于控制台的客户端可以调用此方法。

I have a WCF Webservice hosted on IIS which exposes a single method that takes three integer parameters. I have a simple, console based client which can call this method.

int InsertNewOrder(short quantity, int custID, int productID);

如果我的理解是正确的,我需要提供的JMeter的方法的细节SOAP信封被调用,并传递参数。我见过很多例子类似如下:

If my understanding is correct, I need to provide JMeter a SOAP envelope with the details of the method to be called and parameters to be passed. I have seen many examples similar to below:

<soapenv:Envelope xmlns:soapenv="schemas.xmlsoap.org/soap/envelope/">; 
<soapenv:Body>
<ns2:InsertNewOrder xmlns:ns2="?????"> 
<ns2:Param1>${1}</ns2:Param1> 
<ns2:Param1>${1}</ns2:Param1> 
<ns2:Param1>${1}</ns2:Param1> 
</ns2:InsertNewOrder>  
</soapenv:Body>
</soapenv:Envelope>



然而,看着我的WSDL文档,我看不出它是指任何的所需的参数传递给该方法。我也用提琴手到客户端的SOAP消息检查到该服务。同样,我看不出它传递参数。这样一来,我不知道如何创建一个简单的SOAP信封,我可以使用JMeter用来测试这项服务。

However, from looking at my WSDL doc, I don't see where it refers to any of the parameters needed to pass to the method. I've also used Fiddler to examine the client's soap messages to the service. Again, I don't see where it's passing the parameters. As a result, I don't know how to create a simple SOAP envelope I can use with JMeter to test this service.

任何人都可以提出建议,为什么WSDL文档不提供方法参数的任何细节,或解释我怎么能创建使用JMeter使用必要的SOAP信封?

Can anyone advise as to why the WSDL doc does not provide any details of the method parameters, or explain how I can create the necessary SOAP envelope for use with JMeter?

我在使用VS 2010,JMeter的2.4,C#我的编码IIS V6发动机,的wsHttpBinding。

I am coding in C# using VS 2010, JMeter 2.4, IIS v6, wsHttpBinding.

推荐答案

免责声明:我不是一个WSDL专家,所以我不能告诉你为什么DOC没有提供细节

Disclaimer: I'm not a WSDL expert, so i can't tell you why the doc doesn't provide detail.

要生成JMeter的SOAP信封,我使用的soapUI的免费版本。

To generate the SOAP envelope for JMeter, I've used the free version of soapUI.

Steps:
1. Import WSDL into soap
2. Create a default request for the method
3. Set the request view to RAW, and copy into JMeter

这为我提供了我需要的JMeter,包括参数,用户代理,终端等的所有信息

This provides me all the information I need for jmeter, including parameters, user-agent, endpoint, etc.

这篇关于如何测试使用JMeter一个WCF web服务?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆