Testing .NET WebAPI from Visual Studio 2012 iDE and LoadRunner
I want to Test the .Net Web API from Visual Stusio 2012 (C#) and LoadRunner.
For Example - Using WebServices Protocol I have create the below mentioned webservice and it is working fine also..
Now the Question is --> HOW can I, Create the same logic in Visual Studio 2012 IDE using C# language and after creating that script, use it in LoadRunner 12.0
At first, you have to get wsdl file from your service. You can use one of following ways:
- Use the WCF Service Host to start a new instance of your service (ex: WcfSvcHost.exe /service:<pathToServiceDll> /config:<pathToConfigFile>), and then add ?wsdl to the service address to access the wsdl (http://localhost:1234/Service.svc?wsdl for instance).
- Use Web Services Discovery Tool to export wsdl file by command: disco [/out:<dir>] <URL>. In which, default out directory is current directory, <URL> is your service URL.
Then you can use import WSDL function in LR to add web service you want to test.
But, i think there is some confusion, I am able to achieve this using Http/Html protocol..
The Problem is ==> If i am using .NET virtual user type and open the VSTS 2012 IDE and want to Write a Code to POST this WebAPI, HOW i would be able to do that....
BECAUSE, in the VSTS 2012 IDE, the "web_custom_request" is not recognized... is there any way to POST the web services requests from the Visual Studio 2012 IDE.. any method exist ??
Please let me know..