我正在使用jMeter 3.3并试图ping我的wcfservice。
地址:http://localhost:88/MyService.svc
端点:MyEndpoint
我创建了Jmeter http请求
服务器name:localhost
端口:88
方法:Post
路径:/MyService.svc
内容类型:text/xml
SOAPAction:http://localhost:88/MyService/MyEndpoint
问题是我的ednpoint没有到达。 soapUi或WcfTestClient中的相同数据运行良好。我在JMeter配置中遗漏了什么吗?
提前致谢。
答案 0 :(得分:2)
我认为你错过了几件事
例如,WCF测试客户端的原始信封是这样的:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<Action s:mustUnderstand="1" xmlns="http://schemas.microsoft.com/ws/2005/05/addressing/none">http://tempuri.org/IService1/DoWork</Action>
</s:Header>
<s:Body>
<DoWork xmlns="http://tempuri.org/" />
</s:Body>
</s:Envelope>
JMeter的Body不应该有Header部分:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<DoWork xmlns="http://tempuri.org/" />
</s:Body>
</s:Envelope>
一般情况下,Jmeter配置如下:
这应该解决问题。
P.S。查看结果树非常适合调试
答案 1 :(得分:1)
鉴于您能够通过SoapUI运行请求,您应该能够使用JMeter的HTTP(S) Test Script Recorder
捕获它配置SoapUI进行录制
Test Plan -> Thread Group -> Recording Controller
采样器的形式存储在"aggs": {
"types": {
"terms": {
"field": "type",
"include": [
1,
2
]
},
"aggs": {
"my_sum": {
"sum": {
"field": "price"
}
}
}
},
"total_sum": {
"sum_bucket": {
"buckets_path": "types.my_sum"
}
}
}
下。您应该能够在JMeter中成功重播请求。另一个选项是HTTP Request