Question

I want to automate testing of WCF Web Services(over TCP) using QTP's WebServices Add-In. However when I specify path of WSDL it gives me errors. Has anyone tried using QTP? or any other tool that I can use for testing?

Was it helpful?

Solution

From what I know, QTP cannot be used for testing WCF services using NetTcpBinding. They should be using plain BasicHttpBinding for it to work.

OTHER TIPS

When I call a webservice I stipulate 3 manadatory parameters for QTP and then the parameters for the actual webservice itself. This works everytime (except wen the webservice is not running)

Here is an example of that:

'=============================================================================
' Define WebService
qtpP1 = "wsdl:=http://172.16.69.84:8080/testframeworkwebapp/services/STFSQLExecutionService?WSDL"
' Define service & port
qtpP2 = "service:=GenericSQLExecutorService"
qtpP3= "port:=STFSQLExecutionService"
' Define Webservice calling parameters
wsP1 = "Select Count(*) From PERSON_TABLE"

'====================================================================
' Call to the WebService
executeSQLByDBName = WebService(qtpP1, qtpP2, qtpP3).executeSQLByDBName(wsP1)

If WebService(qtpP1, qtpP2, qtpP3).GetLastError > "" Then
  MsgBox "WebService Issue"
Else
  MsgBox "WebServices Call Worked OK"
End If
'====================================================================

You can use QEngine. It is a good way to test your WCF and other types of service.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top