简体   繁体   中英

Load testing WCF service hosted in local IIS using JMeter

My requirement is to load test a WCF service hosted in the local IIS server. We are trying to improve the performance of a WCF service. In the PROD environment both the WCF service and the desktop application which consumes this service also resides in the same machine.

So in order to baseline the existing performance of the WCF serrvice, I'm trying to use JMeter to load-test the service by running it from the same machine where the service is hosted.

I'm using JMeter's HTTP Test Script Recorder to capture any request going from desktop app to WCF service, so that I will be able to later increase the thread count to get the performance measurements.

problem is I'm unable to capture any requests going to the service hosted in the local IIS server. But if I host the same service in a separate server and execute the Jmeter from the machine where consuming desktop app is running, then Jmeter is able to capture all the outgoing requests to that web server.

Is that even possible to record requests where service and consuming desktop app both resides in the same machine?

Current Configurations

I'm using 8895 as the port number in the Jmeter proxy

在此处输入图片说明

Manual proxy setting in windows (using the same port number configured in Jmeter)

在此处输入图片说明

Desktop app configuration file (which sends requests to local service)

    <bindings>
        <wsHttpBinding>
            <binding name="WSHttpBinding_IPayment" proxyAddress="http://127.0.0.1:8895" useDefaultWebProxy="false" bypassProxyOnLocal="false">                     
                <security mode="None" />
            </binding>            
        </wsHttpBinding>        
    </bindings>
    <client>
      <!--<endpoint address="http://10.2.179.100/PaymentService/Payment.svc " binding="wsHttpBinding"-->                      
      <endpoint address="http://127.0.0.1:88/Payment.svc" binding="wsHttpBinding"          
          bindingConfiguration="WSHttpBinding_IPayment" contract="PaymentServiceReference.IPayment"
            name="WSHttpBinding_IPayment" />
    </client>
</system.serviceModel>

  1. You might need to add Microsoft Loopback Adapter in order to capture link-local traffic

    在此处输入图片说明

  2. You might need to set a system-level HTTP proxy like:

     netsh winhttp set proxy 127.0.0.1:8895 

More information: How to Run Performance Tests of Desktop Applications Using JMeter

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM