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?
Asked
Active
Viewed 4,820 times
3 Answers
2
From what I know, QTP cannot be used for testing WCF services using NetTcpBinding. They should be using plain BasicHttpBinding for it to work.

cruizer
- 6,103
- 2
- 27
- 34
1
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
'====================================================================
0
You can use QEngine
. It is a good way to test your WCF and other types of service.

radu florescu
- 4,315
- 10
- 60
- 92

Phani
- 1